SlideX

Utilities & Providers
stable

CSS-driven Vue transition that slides a child element horizontally (translateX −15px → identity) combined with an opacity fade. Sub-component of the Transition family.

Structure

Anatomie

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

Anatomy of OrigamSlideXSchematic of the slide-x transition with enter and leave phases. enter-active translateX(−15px) → 0 opacity: 0 → 1 leave-active 0 → translateX(−15px) opacity: 1 → 0 1 2 →
Anatomy of <origam-slide-x> — enter ① slides from translateX(−15px) + opacity:0 to identity. Leave ② reverses the same transform + fades out. Duration: 0.3 s; move: 0.5 s.
1.origam-transition--slide-x-enter-active
Enter phase. Child animates from translateX(−15px) + opacity:0 to identity. Duration: 0.3 s, easing: cubic-bezier(0.4,0,0.2,1).
2.origam-transition--slide-x-leave-active
Leave phase. Child slides back to translateX(−15px) + opacity:0 over 0.3 s.

API

Props

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

Vue transition mode: "in-out" or "out-in".
disabled
boolean
false
Disables the animation. Content appears/disappears instantly.
name
string
'origam-transition--slide-x'
Vue transition name class prefix. Defaults to origam-transition--slide-x.
group
boolean
false
When true, renders a <transition-group> to enable list-move animation.
hideOnLeave
boolean
false
Sets the leaving element to visibility: hidden immediately.
leaveAbsolute
boolean
false
Positions the leaving element absolutely during leave to prevent layout jank.
origin
string
CSS transform-origin applied during the transition.

API

Slots

Emplacements de contenu exposés par ce composant.

#default
A single child element (or multiple when group=true) that receives the horizontal slide transition.

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>
Forwards a filtered subset of props to the underlying transition.

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.

Horizontal translate distance token. The component hardcodes −15px in its CSS class; this token is the declared reference value.
Default transition duration (0.3 s hardcoded in CSS class).
Easing function for slide-x (decelerate: 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

  • Animation is disabled automatically when prefers-reduced-motion: reduce is detected (disabled=true via useCssTransition).
  • The wrapper is transparent to the accessibility tree. Only the slotted child 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 horizontal slide

vue

out-in mode (tab content)

vue

List animation (group)

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.