# theme/without-transitions (zidane-ui)

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

## Functions

### `withoutTransitions`

Function.

Run a theme swap with every transition off for one frame
(`.zg-no-transitions`), so surfaces snap to the new palette together
instead of cross-fading at their own speeds.

```ts
function withoutTransitions(apply: () => void, root?: HTMLElement): void
```

**Parameters**

- `apply` (`() => void`): Makes the change, such as setting the new theme's variables.
- `root?` (`HTMLElement`, default `document.documentElement`): The element that gets the `zg-no-transitions` class. Defaults to
  `document.documentElement`.

Source: [ui/src/theme/without-transitions.ts:10](https://github.com/Tahul/zidane/blob/main/ui/src/theme/without-transitions.ts#L10)
