# Tag (Andromeda Legacy)

Tag 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

Compact uppercase mono label. 4 variants. Optional dismiss button when onClose is provided.

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

## Install

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

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

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

## Example

```tsx
import { useState } from 'react'
import { Tag } from '@/components/aicanvas/andromeda/components/Tag'

const [visible, setVisible] = useState(true);

visible && <Tag variant="accent" onClose={() => setVisible(false)}>Paid</Tag>
```

## Variants

- `variant`: default, accent, warning or fault (default 'default')

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant?` | `'default'\|'accent'\|'warning'\|'fault'` | `'default'` | One of: default, accent, warning, fault. |
| `children?` | `React.ReactNode` |  | Content rendered inside the component. |
| `onClose?` | `() => void` |  | When provided, renders a close button. |
| `className?` | `string` |  | Additional CSS classes applied to the root element. |
| `style?` | `React.CSSProperties` |  | Inline styles applied to the root element. |

## More Andromeda Legacy components

- [Textarea](https://aicanvas.me/design-systems/andromeda/textarea.md)
- [Toggle](https://aicanvas.me/design-systems/andromeda/toggle.md)
- [Table](https://aicanvas.me/design-systems/andromeda/table.md)
- [Tooltip](https://aicanvas.me/design-systems/andromeda/tooltip.md)
- [Trend Chart](https://aicanvas.me/design-systems/andromeda/trend-chart.md)
