my/ui

Command Palette

Search for a command to run...

All components

Right Aligned Card Checkbox

checkboxes

Origin UI component.

responsive · 600px

Install

Same command in any shadcn project — React (Vite/CRA), Next.js, Remix, Astro, and more:

$npx shadcn@latest add https://your-domain/r/comp-143.json

Usage

import Cmp from "@/registry/origin-ui/comp-143";

export default function Demo() {
  return <Cmp />;
}

Component source

import { useId } from "react";

import { Checkbox } from "@/components/ui/checkbox";
import { Label } from "@/components/ui/label";

export default function Component() {
  const id = useId();
  return (
    <div className="flex items-start gap-2">
      <Checkbox
        aria-describedby={`${id}-description`}
        className="order-1"
        id={id}
      />
      <div className="grid grow gap-2">
        <Label htmlFor={id}>
          Label{" "}
          <span className="font-normal text-muted-foreground text-xs leading-[inherit]">
            (Sublabel)
          </span>
        </Label>
        <p className="text-muted-foreground text-xs" id={`${id}-description`}>
          You can use this checkbox with a label and a description.
        </p>
      </div>
    </div>
  );
}

Source: Origin UI