Skip to content
Eskais UI

Forms

Checkbox

UI SDK Checkbox and CheckboxGroup: checked, unchecked and indeterminate, labelled by Field.

Example

Closed more than 30 days ago.

Installation

npx shadcn@latest add @eskais/checkbox
Brings alongfield
npm packageslucide-react

Usage

Import
import {  Checkbox,  CheckboxGroup,  CheckboxIndicator,  createCheckboxController,  createCheckboxGroupController,} from "@/components/ui/checkbox"

API reference

Other exports

createCheckboxControllercreateCheckboxGroupControllertype CheckboxControllertype CheckboxStatetype CheckedState

Accessibility

  • Checked, unchecked and indeterminate, with a 3:1 edge from input-strong.
  • Grows to a 44px hit area on touch.

Agent actions

Agents call setChecked(true | false); other values are refused.

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.