# motion/reduced (zidane-ui)

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

## Functions

### `useMotionLevel`

Function.

Returns the current [`MotionLevel`](https://zidane.si/docs/reference/ui-motion-reduced.md#MotionLevel), read from `html[data-motion]`. It updates when the
attribute changes and is `full` when the attribute is missing or on the server.

```ts
function useMotionLevel(): MotionLevel
```

**Returns** `MotionLevel`

Source: [ui/src/motion/reduced.ts:29](https://github.com/Tahul/zidane/blob/main/ui/src/motion/reduced.ts#L29)

### `useReducedMotion`

Function.

True for `off` and `reduced`: skip decorative JS-driven animation.

```ts
function useReducedMotion(): boolean
```

**Returns** `boolean`

Source: [ui/src/motion/reduced.ts:34](https://github.com/Tahul/zidane/blob/main/ui/src/motion/reduced.ts#L34)

## Types

### `MotionLevel`

Type.

How much the UI animates: `off` is instant, `reduced` keeps only fades, `full` plays all motion.

```ts
type MotionLevel = 'off' | 'reduced' | 'full'
```

Source: [ui/src/motion/reduced.ts:12](https://github.com/Tahul/zidane/blob/main/ui/src/motion/reduced.ts#L12)
