Components
Loading preview...
A selectable control for binary choices, form options, indeterminate states, labels, and validation messaging.
npx shadcn@latest add https://21st.dev/r/hero_ui/heroui-checkbox"use client";
import * as React from "react";
import { Checkbox, Description, Label } from "@/components/ui/heroui-checkbox";
export default function IndeterminateDemo() {
const [selected, setSelected] = React.useState(false);
return (
<div className="flex min-h-screen w-full items-center justify-center overflow-hidden bg-background p-8">
<Checkbox isIndeterminate={!selected} isSelected={selected} onValueChange={setSelected} id="select-all">
<Label>Select all</Label>
<Description>Shows indeterminate state (dash icon)</Description>
</Checkbox>
</div>
);
}
export { IndeterminateDemo };