import { Canvas, Controls, Meta, Title } from '@storybook/addon-docs/blocks';
import * as SpinnerStories from './Spinner.stories';
<Meta of={SpinnerStories} name='Usage' />
<Title />
{/* check-docs-ignore: usage -- the designer removed the Usage section by hand */}
## Purpose
The PDS Spinner, extended with an agentic color: `color='agentic'` paints the arc and track with the AI gradient.
`hasAvatar` adds the Zappy bolt inside the ring, in the plain foreground color (not the gradient). It is half the ring tall. It shows from `2xl` up, and never when `isInline` is set, whatever the size.
## Accessibility
- The Spinner is not interactive: it takes no focus and has no keyboard behavior.
- The label is always in the page. With `showLabel` it shows under the ring; otherwise it is visually hidden. The ring and the bolt are decorative and hidden from assistive technology; the label is the Spinner's accessible text, as in the PDS Spinner. Keep it short and say what is loading.
- An inline spinner (`isInline`) never shows its label; keep the text it sits beside meaningful, or set `label`.
- The rotation stops when the person has asked for reduced motion (`prefers-reduced-motion`), in both the default and the agentic spinner.
- The agentic gradient is the same in light and dark. The arc and the track keep the gradient colors, so check their contrast against the surface they sit on.
## Implementation
See the table below for the available props. The other stories show every variant and state.
<hr />
<Canvas of={SpinnerStories.Default} />
<Controls of={SpinnerStories.Default} />
<hr />
<Canvas of={SpinnerStories.WithIcon} />
Spinner: agentic color variant
Extend the existing PDS v2 Spinner (not a new component).
Extends a PDS componentOpen in Storybook