{# @description Breaks the words it wraps into slices that jump sideways in two of the theme's colours for a moment, every few seconds. A few words, on one line. #}
{# @prop from:select['primary', 'secondary', 'accent', 'neutral', 'base-100', 'base-200', 'base-300'] | default:"primary" | description:"The colour of the slices that jump left" #}
{# @prop to:select['primary', 'secondary', 'accent', 'neutral', 'base-100', 'base-200', 'base-300'] | default:"secondary" | description:"The colour of the slices that jump right" #}
{# @prop intensity:number | default:"1" | description:"How far the slices jump, as a multiple: 2 is twice as far" #}
{# @prop frequency:number | default:"1" | description:"How often it breaks, as a multiple: 1 is every four seconds, 2 every two, and 0 never" #}
{# @prop repeat:number | description:"How many times it breaks before it stops. Left out, it never stops." #}
{# @prop class:text | description:"Extra classes on the span" #}
{# @slot not the CSS — The words to break. Rendered three times, so plain words and nothing with an id. #}
{% comment %}
The words never move: the slices are two coloured copies laid over them, on
two clocks so the pair never repeats exactly. A box of its own, so it does not
wrap (docs/adr/0005-text-effects-are-spans-moved-by-css.md).
{% endcomment %}
{% with pace=frequency|floatformat:'-3u'|default:'1' %}
{{ slot }}
{{ slot }}
{{ slot }}
{% endwith %}