useTransition
Family of three composables (useTransition, useCssTransition, useWindowTransition) that resolve a transition name from ITransitionProps and wire optional lifecycle hooks. useCssTransition handles leaveAbsolute / hideOnLeave helpers. useWindowTransition coordinates height animations for window-based transitions in stepper or tab containers.
API
Signature
Full TypeScript signature sourced from the composable file.
useWindowTransition requires an ORIGAM_WINDOW_KEY injection — it is only usable inside OrigamWindow subtrees (e.g. OrigamStepper, OrigamTabs). For standalone transitions use useCssTransition or the OrigamTransition component.
Consumed interfaces
API
Parameters
Input parameters accepted by this composable.
- propsrequiredITransitionProps
- Reads `name` (CSS transition class prefix), `disabled` (bypass the transition), `group` (use TransitionGroup), `mode` (in-out / out-in), `origin` (transform-origin set on beforeEnter), `leaveAbsolute` (position the leaving element absolutely), `hideOnLeave` (display:none on leave).
API
Return values
Properties and methods exposed by the composable return object.
- name
- The resolved transition name. Empty string when disabled (tells Vue not to apply CSS classes).
- isDisabled
- True when `props.disabled` is set. When disabled, `css: false` is passed to the Transition component and lifecycle hooks handle the enter/leave styles.
- tag
- `TransitionGroup` when `props.group` is true, `Transition` otherwise. Bind to `<component :is="tag">` in the consumer template.
- transitionProps
- Computed props bag to spread on the Transition / TransitionGroup root. Includes `css`, `mode`, and lifecycle hooks (onBeforeEnter, onLeave, onAfterLeave) when needed.
Usage
Examples
Ready-to-paste usage snippets.
Fade transition wrapper
Using OrigamTransition (recommended)