shadow
wje-animation is a simple wrapper for playing Animate.css animations over embedded content. It applies keyframes to the first element from the default slot and plays them through the Web Animations API.
The sample below wraps wje-avatar in wje-animation and shows basic animation setup via the name attribute as well as programmatic control via play() and cancel().
- The animation is applied to the first assigned element from the default slot, so insert one main wrapper into the component.
- The default animation name is
heartBeat.
- The
endDelay and iterationStart attributes are written in camelCase in the current implementation.
- The component itself is not an interactive element; the host sets
role="presentation".
- The list of available animations is obtained via
getAnimationsArray().
- Animation should support meaning, not replace it.
- For important flows, think reduced motion.
- If the animated content is interactive, accessibility is handled by the embedded element.
- Use
play() and cancel() for repeated triggering.
- When changing the
name on the fly, verify the refresh of the component in the specific use-case.
- For longer or infinite animations, watch for interference and performance, especially in lists.
| Popis | Určuje oneskorenie pred spustením animácie. |
| Atribút | delay |
| Typ | number |
| Predvolené | 0 |
| Popis | Určuje smer prehrávania animácie. |
| Atribút | direction |
| Typ | string |
| Predvolené | normal |
| Popis | Určuje trvanie prehrávania animácie v milisekundách. |
| Atribút | duration |
| Typ | number |
| Predvolené | 1000 |
| Popis | Určuje easing funkciu použitú pri prehrávaní animácie. |
| Atribút | easing |
| Typ | string |
| Predvolené | linear |
| Popis | Určuje oneskorenie po dohraní animácie. |
| Atribút | endDelay |
| Typ | number |
| Predvolené | 0 |
| Popis | Určuje fill mode použitý pri prehrávaní animácie. |
| Atribút | fill |
| Typ | string |
| Predvolené | auto |
| Popis | Určuje počet opakovaní animácie. |
| Atribút | iterations |
| Typ | string|number |
| Predvolené | - |
| Popis | Určuje počiatočný posun pre prvé opakovanie animácie. |
| Atribút | iterationStart |
| Typ | number |
| Predvolené | 0 |
| Popis | Určuje názov animácie z knižnice Animate.css, ktorá sa prehrá nad vloženým elementom. |
| Atribút | name |
| Typ | string |
| Predvolené | heartBeat |
Pre tento komponent nie sú dostupné žiadne udalosti.
| Popis | Vráti zoznam animácií naparsovaných z knižnice Animate.css. |
| Signatúra | () => Array |
| Popis | Zruší aktuálne inicializovanú animáciu pred prípravou novej. |
| Signatúra | () => void |
| Popis | Spustí alebo obnoví prehrávanie aktuálnej animácie. |
| Signatúra | () => void |
| Popis | Zruší aktuálnu animáciu a vráti jej prehrávanie do počiatočného stavu. |
| Signatúra | () => void |
Pre tento komponent nie sú dostupné žiadne CSS časti tieňa.
Pre tento komponent nie sú dostupné žiadne vlastné CSS vlastnosti.
| Názov | Popis |
|---|
default | Predvolený slot pre hlavný obsah komponentu. |