# Spinner

An animated loading indicator with spinning blades.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).



<ComponentPreview name="spinner/Basic" />

## Import [#import]

```rust
use maccn::{MacSpinner, SpinnerSize};
```

## Usage [#usage]

```rust
MacSpinner::new("loading");

MacSpinner::new("loading-sm").size(SpinnerSize::Small);
```

## Sizes [#sizes]

<ComponentPreview name="spinner/Sizes" />

```rust
use gpui::div;
use maccn::{MacSpinner, SpinnerSize};

div()
    .flex()
    .items_center()
    .gap_2()
    .child(MacSpinner::new("spinner-r"))
    .child(MacSpinner::new("spinner-s").size(SpinnerSize::Small))
```

## API [#api]

### Props [#props]

| Prop    | Type          | Default   |
| ------- | ------------- | --------- |
| `size`  | `SpinnerSize` | `Regular` |
| `color` | `Hsla`        | theme     |
