# Button (Andromeda Legacy)

Button 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

5 variants × 3 sizes with full hover, focus, active, and disabled coverage. shadcn/ui-aligned API: variant, size, asChild.

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

## Install

```bash
npx shadcn@latest add @aicanvas/andromeda-button-system
```

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/Button.tsx` (under `src/` if your project has one). With the usual `@/` alias:

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

## Example

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

<Button variant="default" size="md">Deploy changes</Button>
```

## Variants

- `variant`: default, outline, ghost, destructive or link (default 'default')
- `size`: sm, md or lg (default 'md')

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant?` | `'default'\|'outline'\|'ghost'\|'destructive'\|'link'` | `'default'` | One of: default, outline, ghost, destructive, link. |
| `size?` | `'sm'\|'md'\|'lg'` | `'md'` | One of: sm, md, lg. |
| `asChild?` | `boolean` | `false` | When true, renders the only child element with the button's props/styles. |
| `icon?` | `React.ComponentType<IconProps>` |  | Icon component rendered before children. |
| `children?` | `React.ReactNode` |  | Content rendered inside the component. |
| `className?` | `string` |  | Additional CSS classes applied to the root element. |
| `style?` | `React.CSSProperties` |  | Inline styles applied to the root element. |
| `type?` | `'button'\|'submit'\|'reset'` | `'button'` | Native button type; defaults to 'button', so it does not submit an enclosing form unless set to 'submit'. |
| `disabled?` | `boolean` |  | When true, disables the control. |
| `onClick?` | `(e: React.MouseEvent<HTMLButtonElement>) => void` |  | Handler called when the element is clicked. |

## More Andromeda Legacy components

- [Card](https://aicanvas.me/design-systems/andromeda/card.md)
- [Checkbox](https://aicanvas.me/design-systems/andromeda/checkbox.md)
- [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)
