# motion/shimmer (zidane-ui)

Import: `import { … } from 'zidane-ui'`. Source: [ui/src/motion/shimmer.ts](https://github.com/Tahul/zidane/blob/main/ui/src/motion/shimmer.ts).

## Functions

### `syncShimmer`

Function.

Ref callback for a `.zg-shimmer` label: starts its sweep on a shared
phase (the page clock), so a label swapped in mid-sweep carries the band
on from where the outgoing one had it, instead of restarting it.

```ts
function syncShimmer(el: HTMLElement | null): void
```

**Parameters**

- `el` (`HTMLElement | null`): The label element, or `null` when the ref detaches, which does nothing.

Source: [ui/src/motion/shimmer.ts:13](https://github.com/Tahul/zidane/blob/main/ui/src/motion/shimmer.ts#L13)

## Constants

### `SHIMMER_MS`

Constant.

One sweep of `.zg-shimmer`; must match its animation in styles/motion.css.

```ts
const SHIMMER_MS = 1800
```

Source: [ui/src/motion/shimmer.ts:4](https://github.com/Tahul/zidane/blob/main/ui/src/motion/shimmer.ts#L4)
