UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

25 lines (24 loc) 825 B
import { Checkbox as CheckboxPrimitive } from 'radix-ui'; import { ComponentProps } from 'react'; type CheckboxProps = ComponentProps<typeof CheckboxPrimitive.Root>; /** * Checkbox component, it implements just the Checkbox control input. * * Use [CheckboxGroup](src/components/CheckboxGroup) for a complete checkbox selection list component. * * @example * // It's typically used with a SideLabel for proper labeling * <SideLabel label="Show unread only"> * <Checkbox checked={checked} onCheckedChange={setChecked} /> * </SideLabel> * * @example * // With aria-label for standalone usage * <Checkbox * checked={checked} * onCheckedChange={setChecked} * aria-label="Checkbox" * /> */ export declare const Checkbox: ({ className, ...props }: CheckboxProps) => import("react").JSX.Element; export {};