# cover

function in `@dioramajs/diorama/transitions`

```ts
import { cover } from '@dioramajs/diorama/transitions'
```

Preset with the `cover` plugin: the old page leaves and the new one arrives through a GL cover.
Needs `effects` and works with the `transitions` preset, which tells it when the page changed.

    createApp({ presets: [effects(), transitions(), cover({ name: 'ink', color: '#e4002b' })] })

```ts
function cover(
  options?: CoverName | CoverOptions,
): Preset<Plugin<'cover', CoverSettings, CoverApi, never>>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `options?` | `CoverName \| CoverOptions` |  |

Also exported from `@dioramajs/transitions/cover`.

Defined in [packages/transitions/src/cover/index.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/transitions/src/cover/index.ts#L514).
