# TransitionApi

interface in `@dioramajs/diorama/transitions`

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

The `transition` service: call it with a swap to fly copies between pages.

```ts
TransitionApi(swap: Swap, options?: TransitionOptions): Transition
```

| Parameter | Type | Description |
| --- | --- | --- |
| `swap` | `Swap` |  |
| `options?` | `TransitionOptions` |  |

## Members

| Name | Type | Description |
| --- | --- | --- |
| `current` | `ReadonlySignal<Transition \| undefined>` | The running transition, if any. |
| `page` | `PageScope` | The current page. Closed right after the next swap. |

Also exported from `@dioramajs/transitions`.

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