# Checkbox (Andromeda Legacy)

Checkbox is a component of the free, MIT-licensed Andromeda Legacy design system from AI Canvas (https://aicanvas.me). Index of every system, component and install setup: https://aicanvas.me/llms.txt

Square boolean control. Controlled or uncontrolled. Inline label, accent fill on checked, an accent focus ring, a press scale, a pop-in on the checkmark, and a 40px touch target on coarse pointers.

- Design system: [Andromeda Legacy](https://aicanvas.me/design-systems/andromeda.md)
- License: MIT
- Install slug: `andromeda-checkbox`
- Page: https://aicanvas.me/design-systems/andromeda/checkbox

## Install

```bash
npx shadcn@latest add @aicanvas/andromeda-checkbox
```

Needs a free AI Canvas account; signed out, the command writes a placeholder (an `AccountRequired` notice) instead.

Every Andromeda Legacy component at once: `npx shadcn@latest add @aicanvas/andromeda`.

Token setup: the Install section of https://aicanvas.me/llms.txt.

## Use it

It installs to `components/aicanvas/andromeda/components/Checkbox.tsx` (under `src/` if your project has one). With the usual `@/` alias:

```tsx
import { Checkbox } from '@/components/aicanvas/andromeda/components/Checkbox'
```

## Example

```tsx
import { Checkbox } from '@/components/aicanvas/andromeda/components/Checkbox'

<Checkbox label="Include archived invoices" defaultChecked />
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `checked?` | `boolean` |  | Controlled checked state. |
| `defaultChecked?` | `boolean` | `false` | Uncontrolled initial state. |
| `onCheckedChange?` | `(next: boolean) => void` |  | Handler called with the next checked state when toggled. |
| `label?` | `string` |  | Optional inline label. |
| `disabled?` | `boolean` | `false` | Disables the checkbox and blocks interaction. |
| `className?` | `string` |  | Extra classes merged onto the visual box. |
| `style?` | `React.CSSProperties` |  | Inline styles applied to the outer wrapper. |
| `id?` | `string` |  | Id applied to the input and inline label, auto-generated if omitted. |

## More Andromeda Legacy components

- [Corner Markers](https://aicanvas.me/design-systems/andromeda/corner-markers.md)
- [Date Range Picker](https://aicanvas.me/design-systems/andromeda/date-range-picker.md)
- [Drawer](https://aicanvas.me/design-systems/andromeda/drawer.md)
- [Empty State](https://aicanvas.me/design-systems/andromeda/empty-state.md)
- [Gauge](https://aicanvas.me/design-systems/andromeda/gauge.md)
