Components
Loading preview...
Provides shared state for a series of checkboxes. Styled wrapper for CheckboxGroup from Base UI with support for parent checkboxes, indeterminate state, and nested groups.
npx shadcn@latest add https://21st.dev/r/coss.com/checkbox-groupimport { Checkbox } from "@/components/ui/checkbox";
import { CheckboxGroup } from "@/components/ui/component";
import { Label } from "@/components/ui/label";
export default function CheckboxGroupWithDisabled() {
return (
<div className="flex items-center justify-center w-full min-h-screen bg-background">
<CheckboxGroup aria-label="Select frameworks" defaultValue={["next"]}>
<Label>
<Checkbox value="next" />
Next.js
</Label>
<Label>
<Checkbox disabled value="vite" />
Vite
</Label>
<Label>
<Checkbox value="astro" />
Astro
</Label>
</CheckboxGroup>
</div>
);
}