# Checkbox

A generous check target with a secondary description and native form submission.

- Family: Forms, imported from `mizu-ui` or `mizu-ui/forms`
- Docs: https://mizu.user64bit.world/components/checkbox
- Source: https://github.com/0xuser64bit/mizu/blob/main/packages/mizu/src/forms/Fields.tsx

## Usage

```tsx
import { Checkbox } from "mizu-ui";

export function Example() {
  return (
    <Checkbox
      label="Include source maps"
      hint="Useful when debugging production."
      name="sourcemaps"
      defaultChecked
    />
  );
}
```

## Copy it with the shadcn CLI

```sh
npx shadcn@latest init 0xuser64bit/mizu/preset # once, where there is no components.json
npx shadcn@latest add 0xuser64bit/mizu/checkbox
```

## Props

- `label`: `ReactNode`. Clickable label.
- `hint`: `string`. Linked secondary description.
- `...input`: `InputHTMLAttributes`. Native checked, defaultChecked, events, name and ref.

## Accessibility

The full label is clickable. Native checkbox handles Space, focus and checked state.

## Motion

CSS transitions explain state changes. Reduced motion removes travel.
