@dioramajs/transitions/cover
Exports of @dioramajs/transitions/cover.
On this page
import { cover, covered, coverPlugin } from '@dioramajs/transitions/cover'Functions
cover | 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. |
covered | Closes the cover of `app` and resolves true once the page is covered, for routers that change the page from code: `await covered(app, event); router.push(href)`. Resolves false at once without the plugin, before the app runs, or when the cover can't play. |
coverSettings | Splits flat options into the look's params and the timing. |
linkOf | The link a plain click follows to another page of this site, if it is one. |
Constants
coverPlugin | Provides `app.cover`, a GL cover over the page while it changes. |
Interfaces
CoverApi | The `cover` service. |
CoverSettings | Settings of the `cover` plugin; `cover()` makes them from flat options. |
CoverTiming | Timing and behaviour shared by every cover. |
CurtainCover | `curtain`: a panel sweeps over the old page and on, off the new one. |
CustomCover | Your own cover: an effect with a `position` param (0 page shown, 1 covered, 2 shown again), and optionally `x` and `y`, the origin in viewport fractions. It runs on `<html>`. |
InkCover | `ink`: a blot spreads from the clicked link over the page, then recedes off the new one. |
PixelCover | `pixel`: the old page breaks into growing blocks and the new one resolves from them. |
Types
CoverName | The ready-made covers. |
CoverOptions | A cover and its timing, e.g. `{ name: 'ink', color: '#e4002b', duration: 0.7 }`. |
CoverOrigin | Where a cover starts: a click, an element (its centre), or a viewport point in CSS px. |
CoverState | Where the cover is: the page shows, it closes, it hides the page, or it opens. |