Skip to Content
ComponentsCheckbox

Checkbox

The Checkbox component is an interactive checkbox with text label for boolean selections.

Checkbox

Basic Usage

<Checkbox text="Accept Terms & Conditions" checked={checked} onToggle={setChecked} />

Multiple Checkboxes

<Checkbox text="Send Notifications" checked={notifications} onToggle={setNotifications} /> <Checkbox text="Subscribe to Newsletter" checked={newsletter} onToggle={setNewsletter} />

Import

import Checkbox from "../components/Checkbox";

Props

  • text (string, Required): Label text displayed next to checkbox.
  • checked (boolean, Required): Whether checkbox is checked by default.
  • onToggle (function): Function called when checkbox is toggled.