# transition

function in `@dioramajs/diorama`

```ts
import { transition } from '@dioramajs/diorama'
```

Calls `app.transition` if the plugin is running, otherwise runs `swap` once and returns a
settled 'skipped' transition. Safe for routers that navigate before `app.start()` resolves.

```ts
function transition(
  app: { readonly transition?: TransitionApi },
  swap: Swap,
  options?: TransitionOptions,
): Transition
```

| Parameter | Type | Description |
| --- | --- | --- |
| `app` | `{ readonly transition?: TransitionApi }` |  |
| `swap` | `Swap` |  |
| `options?` | `TransitionOptions` |  |

Also exported from `@dioramajs/diorama/auto`, `@dioramajs/diorama/transitions`, `@dioramajs/transitions`.

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