# Gauge (Andromeda Legacy)

Gauge 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

Radial percentage gauge. A single measurement arc over a subtle track with a centered mono readout, in 3 sizes and 3 semantic color variants; the arc sweeps in and the value counts up in sync on first view.

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

## Install

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

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

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

## Example

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

<Gauge value={72} max={100} label="Storage" unit="%" variant="warning" />
```

## Variants

- `size`: sm, md or lg (default 'md')
- `variant`: accent, warning or fault (default 'accent')

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value?` | `number` | `68` | The reading. Clamped to 0..max. Defaults to a demo reading so the bare component renders meaningfully. |
| `max?` | `number` | `100` | Full scale — the arc shows value/max. |
| `size?` | `'sm'\|'md'\|'lg'` | `'md'` | One of: sm, md, lg. |
| `variant?` | `'accent'\|'warning'\|'fault'` | `'accent'` | Arc color by meaning: accent = live/healthy, warning = orange, fault = red. |
| `unit?` | `string` | `'%'` | Suffix after the readout, muted + smaller. Pass '' for a unitless reading. |
| `label?` | `string` |  | Optional code label below the value inside the circle (mono xs, muted, uppercase). Centered when showValue is false. |
| `showValue?` | `boolean` | `true` |  |
| `ariaLabel?` | `string` |  | Overrides the generated "<label or Gauge> <value> of <max><unit>" description. |
| `className?` | `string` |  | Additional CSS classes applied to the root element. |
| `style?` | `React.CSSProperties` |  | Inline styles applied to the root element. |

## More Andromeda Legacy components

- [Heat Grid](https://aicanvas.me/design-systems/andromeda/heat-grid.md)
- [Icon Button](https://aicanvas.me/design-systems/andromeda/icon-button.md)
- [Input](https://aicanvas.me/design-systems/andromeda/input.md)
- [Metric Chart](https://aicanvas.me/design-systems/andromeda/metric-chart.md)
- [Waveform](https://aicanvas.me/design-systems/andromeda/waveform.md)
