# Spinner

A sized loading indicator with an optional accessible status label.

Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.

## Example

```tsx
"use client";

import { FloodRoot, Spinner } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <Spinner label="Loading workspace" />
    </FloodRoot>
  );
}
```

## Design notes

- Standalone indicators expose a status with a localizable label. Decorative indicators are hidden from assistive technology.
- Button loading uses this indicator decoratively and keeps the button name. Do not announce every spinner in a busy area.
- Use Progress when completion is measurable. Reduced motion stops rotation. Available in 0.2.4.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
| `label` | `string` | `"Loading"` |
| `decorative` | `boolean` | `false` |
| `Native HTML props` | `Omit<HTMLAttributes<HTMLSpanElement>, "children" \| "role" \| "aria-label" \| "aria-hidden">` | `Forwarded` |
