Fade

Utilities & Providers
stable

Opacity-only enter/leave CSS transition. A thin wrapper around the generic Transition that sets name="origam-transition--fade".

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

Anatomy of OrigamFadeSchematic showing the fade transition: an entering element at full opacity and a leaving element at opacity 0. enter-active opacity: 0 → 1 leave-active opacity: 1 → 0 1 2 →
Anatomy of <origam-fade> — wraps a single child. During the transition, the entering element ① fades from opacity: 0 to 1 while the leaving element ② fades from 1 to 0 over 300 ms.
1.origam-transition--fade-enter-active
Applied to the entering element. Sets transition-property: opacity, duration: 0.3s, easing: cubic-bezier(0.4, 0, 0.2, 1).
2.origam-transition--fade-leave-active
Applied to the leaving element. Same duration and easing. Opacity animates from 1 to 0 via .origam-transition--fade-leave-to.

API

Props

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

disabled
boolean
false
Disables all animation — content appears/disappears instantly. Automatically true when prefers-reduced-motion: reduce is detected.
name
string
'origam-transition--fade'
Vue transition name class prefix. Pre-set to "origam-transition--fade". Override to use a custom CSS keyframe set.
group
boolean
false
When true, renders a <transition-group> instead of <transition>. Enables list-move animation.
Vue transition mode: "in-out" (new enters then old leaves) or "out-in" (old leaves then new enters).
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.

API

Slots

Emplacements de contenu exposés par ce composant.

#default
A single child element (or multiple when group=true) that will be faded in/out.

API

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

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

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

Fade enter/leave duration (300 ms). Hardcoded in the SCSS block as 0.3s; override via the token rebuild.
Easing function for both enter and leave phases: cubic-bezier(0.4, 0, 0.2, 1).

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Notes

  • useCssTransition automatically sets disabled=true when prefers-reduced-motion: reduce is detected. Content appears/disappears instantly with no opacity animation.
  • The transition wrapper adds no elements to the DOM — it is transparent to the accessibility tree. Only the slotted content is announced by screen readers.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic fade

vue

Out-in mode (swap)

vue