@dioramajs/transitions
Page transitions and flights of keyed elements.
On this page
import { transition, TransitionError, transitionPlugin } from '@dioramajs/transitions'Functions
transition | 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. |
transitions | Preset with the `transition` plugin, e.g. `presets: [effects(), transitions()]`. |
Classes
TransitionError | Reported through `app.report` (the kernel wraps it as `REPORTED`) or logged in dev. |
Constants
transitionPlugin | Provides `app.transition`, page transitions that fly the GL copies of keyed elements. |
Interfaces
Flight | Every write requests a frame, so it can be tweened directly. |
FlightOptions | How copies fly between pages. |
PageScope | The current page: a scope closed when the next page replaces it. |
Presence | An unpaired copy that leaves or a new copy that enters. |
PresenceOptions | How unpaired copies leave and new ones enter. |
Transition | Thenable. Resolves with the result and never rejects. |
TransitionApi | The `transition` service: call it with a swap to fly copies between pages. |
TransitionOptions | Options of one `app.transition` call. Unset fields take the plugin options. |
TransitionResult | How a transition ended. |
TransitionsOptions | Options of the `transitions` preset. |
Types
Ease | An easing function from 0..1 to 0..1. |
FlightState | State of one flight. |
Swap | Changes the DOM. May return a thenable that settles once the router is done. |
TransitionErrorCode | Codes of `TransitionError`. |
TransitionPhase | Phase of a transition: the swap runs, copies fly, or it is over. |