# Spinner

The loading arc from the CRM's Button, shared by every busy control. It stops spinning for people who ask for reduced motion.

- Beta: ready to use; its API can still change in a minor release.
- Category: Status & indicators

```tsx
import { Spinner } from "@leap-crm/design-system";
```

## Best practices

- Do: Set `label` when the spinner stands alone, like "Loading contacts", so a screen reader hears that something is loading.
- Do: Set its colour on the parent. It draws in `currentColor`, so it matches the text around it in both themes.
- Don't: Put a spinner inside a `Button` by hand. Return a Promise from `onClick`, or set `loading`, and the button turns its icon into the spinner and back.
- Don't: Use it while a list or panel loads its content. Use `Skeleton`, so the layout holds its shape and nothing jumps when the content arrives.
- Don't: Use it when the amount done is known, like intake questions answered. Use `Progress`.

## Related

- [Skeleton](./skeleton.md)
- [Progress](./progress.md)
- [Fetch Cursor](./fetch-cursor.md)
- [Status Mark](./status-mark.md)

## Examples

What the examples import:

```tsx
import { Spinner } from "@leap-crm/design-system";
```

### Sizes

14, 16 and 24 px. It draws in currentColor, so it takes the colour of the text around it. Give it a label when it stands alone; leave the label off inside a control that already says it's busy.

```tsx
<div className="text-neutral-text-muted flex items-center gap-6">
  <Spinner className="size-3.5" label="Loading" />
  <Spinner label="Loading" />
  <Spinner className="size-6" label="Loading" />
</div>
```

## Props

Also takes every SVG attribute.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `string` |  | Name it when it stands alone, so screen readers hear it. Leave it out inside a control that already says it's busy. |
