Checkbox

A control that allows the user to toggle between checked and not checked.

التثبيت

tsx
npx @smicolon/fasla-ui add checkbox

معاينة

With Label & Description

Receive emails about new products and features

Get notified about security updates

الحالات

الاستخدام

tsx
import { Checkbox } from "@/components/ui/checkbox"

// Basic checkbox
<Checkbox />

// With label
<Checkbox label="Accept terms and conditions" />

// With description
<Checkbox
  label="Marketing emails"
  description="Receive emails about new products"
/>

// Indeterminate state
<Checkbox indeterminate />

// Error state
<Checkbox label="Required field" error />