ScaleRotate
CSS-driven Vue transition that combines scale(0) + rotate(−45deg) + opacity on enter, with a symmetric leave. Sub-component of the Transition family.
Structure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<origam-scale-rotate> — wraps one child element. The enter ① animates from scale(0) + rotate(−45deg) + opacity:0 to full. The leave ② transitions opacity out over 0.3 s.- 1.origam-transition--scale-rotate-enter-active
- Enter phase. Child animates from scale(0) rotate(−45deg) opacity:0 to identity. Duration: 0.3 s, easing: cubic-bezier(0.4,0,0.2,1).
- 2.origam-transition--scale-rotate-leave-active
- Leave phase. Child transitions opacity and transform out over 0.3 s.
API
Props
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.
- mode
- Vue transition mode: "in-out" or "out-in".
- disabledbooleanfalse
- Disables the animation. Content appears/disappears instantly.
- namestring'origam-transition--scale-rotate'
- Vue transition name class prefix. Defaults to origam-transition--scale-rotate.
- groupbooleanfalse
- When true, renders a <transition-group> to enable list-move animation.
- hideOnLeavebooleanfalse
- Sets the leaving element to visibility: hidden immediately.
- leaveAbsolutebooleanfalse
- Positions the leaving element absolutely during the leave phase to prevent layout jank.
- originstring
- 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 scale-rotate 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.
- Default transition duration for the scale-rotate animation (0.3 s hardcoded in the CSS class, token reference for override).
- Easing function: 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
- The transition is disabled automatically when prefers-reduced-motion: reduce is detected (disabled prop becomes 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 scale-rotate transition
out-in mode
List animation (group)
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.
Transition
CSS-driven Vue transition wrappers. Fade, SlideX, SlideY, ExpandX, ExpandY, ScaleRotate.
Fade
Opacity-only enter/leave transition.
SlideX
Horizontal slide + fade transition.
SlideY
Vertical slide + fade transition.
ExpandX
Horizontal width expand/collapse transition.
ExpandY
Vertical height expand/collapse transition.