Transition

Utilities & Providers
stable

CSS-driven Vue transition wrappers. The family includes Fade, SlideX, SlideY, ExpandX, ExpandY, ScaleRotate and a generic Transition component. All are prefers-reduced-motion aware.

Structure

Anatomy

Visual breakdown of the component's internal structure with BEM class call-outs.

Anatomy of OrigamTransitionSchematic showing transition wrapper over entering and leaving elements. enter-active leave-active 1 2 →
Anatomy of <origam-transition> — wraps a single child. During a transition, the entering element ① is animated in while the leaving element ② animates out (sequence depends on mode).
1[enter-active]
The entering element receives the transition CSS class (e.g. origam-transition--fade-enter-active).
2[leave-active]
The leaving element receives the leave-active class and exits. In out-in mode this completes before the enter starts.

API

Props

All props accepted by this component, with their type, default value and description.

disabled
boolean
false
Disables all animation — content appears/disappears instantly. Automatically true when prefers-reduced-motion: reduce is detected.
Vue transition mode: "in-out" (new enters then old leaves) or "out-in" (old leaves then new enters).
transition
boolean | string | TTransitionProps
name
string
'origam-transition--fade'
Vue transition name class prefix. Each sub-component sets this to its own CSS class (e.g. origam-transition--slide-x). Override to use custom CSS keyframes.
group
boolean
false
When true, renders a <transition-group> instead of <transition>. Enables list-move animation.
hideOnLeave
boolean
false
Sets the leaving element to visibility: hidden immediately so it does not participate in layout during the leave animation.
leaveAbsolute
boolean
false
Positions the leaving element absolutely during the leave phase to prevent layout jank in group transitions.
origin
string
CSS transform-origin applied to the element during the transition (used by scale-based transitions).

API

Slots

Content slots exposed by this component.

#default
A single child element (or multiple when group=true) that will be transitioned.

API

Exposed members

Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to the underlying transition.

Customisation

CSS variables

CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.

Default transition duration (300 ms).
Default easing function (cubic-bezier).
Horizontal translate distance for slide-x transition.
Vertical translate distance for slide-y transition.
Initial scale value for scale-based transitions.
Duration for expand-x/expand-y transitions (400 ms — slightly slower for layout shifts).

Inclusion

Accessibility

ARIA roles, keyboard navigation and focus management. Sourced from the real component template.

Notes

  • All Origam transition components detect prefers-reduced-motion: reduce and disable the animation (disabled=true) automatically. Content still appears/disappears instantly.
  • Transition wrappers are transparent to the accessibility tree — they add no ARIA roles or attributes. Only the slotted content is announced by screen readers.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Fade

vue

SlideX and SlideY

vue

Expand (accordion)

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.