my/ui

Command Palette

Search for a command to run...

All components

Colored 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-134.json

Usage

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

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-center gap-2 [--primary:var(--color-indigo-500)] [--ring:var(--color-indigo-300)] in-[.dark]:[--primary:var(--color-indigo-500)] in-[.dark]:[--ring:var(--color-indigo-900)]">
      <Checkbox defaultChecked id={id} />
      <Label htmlFor={id}>Colored checkbox</Label>
    </div>
  );
}

Source: Origin UI