Preview
Usage
The Motion Text component provides beautiful text animations with zero configuration required. Simply pass text and let it animate automatically.
Animation Modes
The component supports six different animation modes:
Speed Control
Manual Control
Take full control of the animation lifecycle:
Looping Animation
Perfect for attention-grabbing headers or hero sections:
Using Slots
You can also use the default slot instead of the text prop:
Vue API
import { DtMotionText } from '@dialpad/dialtone-vue';Slots
Props
Events
Accessibility
The Motion Text component is built with accessibility as a core principle.
Reduced Motion Support
Automatically respects the user's prefers-reduced-motion system setting. When enabled, animations are skipped and text appears instantly.
<dt-motion-text
text="Respects user preferences"
:respects-reduced-motion="true"
/>
Screen Reader Support
Provide alternative text for screen readers:
<dt-motion-text
text="🎉 Congratulations!"
screen-reader-text="Congratulations"
/>
ARIA Attributes
The component automatically includes proper ARIA attributes:
aria-live="polite"during animationaria-labelwhen screen reader text is providedaria-hiddenfor animated content while animating
Best Practices
- Choose the right speed: Use
200for short text,400for longer passages - Don't overuse: Too many animated elements can be distracting
- Consider context: Hero sections work well with
gradient-in, while body text might be better withfade-in - Test with reduced motion: Always ensure your UI works with animations disabled
- Provide screen reader text: If using emojis or special characters, always include alternative text