Design System

Component usage guide template

Browse Components

rhf

RHF Checkbox

A React Hook Form checkbox component with built-in error handling and validation support.

1. Import
Import the RHF Checkbox component from the design system.
import { RHFCheckbox } from "@/design-system/components/rhf";
2. Props
RHF Checkbox component props.
PropTypeDefault
controlControl<T>--
namePath<T>--
labelstring--
descriptionstring--
requiredbooleanfalse
callback(newValue: boolean) => void--
onBeforeChangeRHFBeforeChange<T>--
wrapperClassNamestring--
labelClassNamestring--
descriptionClassNamestring--
errorClassNamestring--
3. Usages
Common RHF Checkbox patterns and configurations.
import { RHFCheckbox } from "@/design-system/components/rhf";
import { useForm } from "react-hook-form";

function Example() {
  const { control } = useForm({
    defaultValues: {
      acceptTerms: false,
    },
  });

  return (
    <RHFCheckbox
      control={control}
      name="acceptTerms"
      label="Accept terms and conditions"
    />
  );
}