# @dioramajs/transitions

Page transitions and flights of keyed elements.

## Functions and values

- [transition](/docs/api/diorama/transition.md): 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.
- [TransitionError](/docs/api/diorama-transitions/transition-error.md): Reported through `app.report` (the kernel wraps it as `REPORTED`) or logged in dev.
- [transitionPlugin](/docs/api/diorama-transitions/transition-plugin.md): Provides `app.transition`, page transitions that fly the GL copies of keyed elements.
- [transitions](/docs/api/diorama/transitions.md): Preset with the `transition` plugin, e.g. `presets: [effects(), transitions()]`.

## Types

- [Ease](/docs/api/diorama-transitions/types/ease.md): An easing function from 0..1 to 0..1.
- [Flight](/docs/api/diorama-transitions/types/flight.md): Every write requests a frame, so it can be tweened directly.
- [FlightOptions](/docs/api/diorama-transitions/types/flight-options.md): How copies fly between pages.
- [FlightState](/docs/api/diorama-transitions/types/flight-state.md): State of one flight.
- [PageScope](/docs/api/diorama-transitions/types/page-scope.md): The current page: a scope closed when the next page replaces it.
- [Presence](/docs/api/diorama-transitions/types/presence.md): An unpaired copy that leaves or a new copy that enters.
- [PresenceOptions](/docs/api/diorama-transitions/types/presence-options.md): How unpaired copies leave and new ones enter.
- [Swap](/docs/api/diorama-transitions/types/swap.md): Changes the DOM. May return a thenable that settles once the router is done.
- [Transition](/docs/api/diorama-transitions/types/transition.md): Thenable. Resolves with the result and never rejects.
- [TransitionApi](/docs/api/diorama-transitions/types/transition-api.md): The `transition` service: call it with a swap to fly copies between pages.
- [TransitionErrorCode](/docs/api/diorama-transitions/types/transition-error-code.md): Codes of `TransitionError`.
- [TransitionOptions](/docs/api/diorama-transitions/types/transition-options.md): Options of one `app.transition` call. Unset fields take the plugin options.
- [TransitionPhase](/docs/api/diorama-transitions/types/transition-phase.md): Phase of a transition: the swap runs, copies fly, or it is over.
- [TransitionResult](/docs/api/diorama-transitions/types/transition-result.md): How a transition ended.
- [TransitionsOptions](/docs/api/diorama-transitions/types/transitions-options.md): Options of the `transitions` preset.
