Skip to content

Checkbox

Checkbox with label and optional per-choice hint. Check mark drawn in CSS so it themes; brass :focus-visible ring on the box.

Prop Type Notes
label (required) React.ReactNode Choice label.
hint React.ReactNode Per-choice hint line under the label.
className string

Other props pass through to the root element (React.InputHTMLAttributes<HTMLInputElement>).

Preview

Declarations

TypeScript
export interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
  /** Choice label. */
  label: React.ReactNode;
  /** Per-choice hint line under the label. */
  hint?: React.ReactNode;
  className?: string;
}

/**
 * Checkbox with label and optional per-choice hint. Check mark drawn in CSS
 * so it themes; brass :focus-visible ring on the box.
 */
export function Checkbox(props: CheckboxProps): React.JSX.Element;