# Spinner

> An indeterminate loading indicator that inherits the current text color.

Status: stable. Category: Feedback.

```ts
import { Spinner } from '@glyphui/ui'
```

Exports: `Spinner`, `spinnerStyles`.

## Spinner props

| Prop | Type | Default | Description |
|---|---|---|---|
| `label` | `string` |  | Accessible label. Omit when the spinner sits inside an element that already says it's busy. |
| `size` | `"sm" \| "md" \| "lg"` |  |  |

## Example: Sizes

```tsx
import { Spinner } from '@glyphui/ui'

export default function Example() {
  return (
    <div className="flex items-center gap-4 text-muted-foreground">
      <Spinner size="sm" />
      <Spinner size="md" />
      <Spinner size="lg" className="text-primary" />
    </div>
  )
}
```

## Example: With a label

Pass label when the spinner is the only signal that something is loading.

```tsx
import { Spinner, Text } from '@glyphui/ui'

export default function Example() {
  return (
    <div className="flex items-center gap-2 text-muted-foreground">
      <Spinner label="Syncing invoices" />
      <Text size="small" tone="muted" aria-hidden="true">
        Syncing invoices…
      </Text>
    </div>
  )
}
```

Live page: https://glyphui.xyz/components/spinner
