InstantTransition
import InstantTransition from '@bbc/front-end-kit/js/highway/transitions/InstantTransition';
A zero-duration Highway.js transition used by HighwayApp as the contextual.instant transition. Removes the outgoing view immediately and calls done() with no animation.
Extends Highway.Transition.
Behaviour
| Phase | What happens |
|---|---|
out | Calls done() immediately — no animation |
in | Removes from from the DOM, then calls done() immediately |
Usage
Registered automatically as transitions.contextual.instant in HighwayApp. To trigger it, add data-transition="instant" to a Highway-managed <a> element. To use it in a custom Highway setup:
import Highway from '@dogstudio/highway';
import InstantTransition from '@bbc/front-end-kit/js/highway/transitions/InstantTransition';
const H = new Highway.Core({
transitions: {
contextual: {
instant: InstantTransition,
}
}
});
External dependencies
- Highway.js (
@dogstudio/highway): BaseTransitionclass.