# `ixfx-text-shimmer`

A label with a sweeping highlight band across the text. Useful as a lightweight "still working…" or "loading…" indicator.

```html
<ixfx-text-shimmer text="Thinking…"></ixfx-text-shimmer>
```

Or using the default slot:

```html
<ixfx-text-shimmer>Reticulating splines…</ixfx-text-shimmer>
```

---

## Properties / attributes

| Attribute / Property | Type      | Default | Description                                     |
|---------------------|-----------|---------|------------------------------------------------|
| `text`              | `string`  | `''`    | Label text. When empty, uses the default slot  |
| `paused`            | `boolean` | `false` | Stops the sweep and shows flat base colour     |

---

## CSS custom properties

| Property                        | Default                        | Description                              |
|---------------------------------|--------------------------------|------------------------------------------|
| `--text-shimmer-color`          | `var(--surface-3-text)`       | Resting / base text colour               |
| `--text-shimmer-gradient-color`| `var(--surface-2-text)`       | Colour of the moving highlight           |
| `--text-shimmer-duration`       | `2s`                           | Time for one sweep                       |
| `--text-shimmer-spread`         | `15%`                          | Half-width of the highlight band         |

```css
/* Example: warmer highlight colour */
ixfx-text-shimmer {
  --text-shimmer-color: #666;
  --text-shimmer-gradient-color: #f0a500;
  --text-shimmer-duration: 1.5s;
}
```

---

## Accessibility

Respects `prefers-reduced-motion`. When reduced motion is preferred, the sweep animation is disabled and the text shows its base colour.

---

## TypeScript types

```ts
import type { TextShimmerElement } from 'ixfxfun-components';
```
