{# @description Types a line out a letter at a time, once, with a caret that follows the last letter and blinks three times when it is done. #} {# @prop text:text | required | description:"The line to type. Plain words: it is split into its letters." #} {# @prop speed:number | default:"1" | description:"How quickly it types, as a multiple: 2 is twice as fast, 0.5 half, and 0 leaves the line typed from the start" #} {# @prop delay:number | default:"0.3" | description:"How many seconds pass before the first letter" #} {# @prop class:text | description:"Extra classes on the span" #} {% comment %} A template can split a string and cannot split markup, so the line is an attribute. Every letter is on the page from the start, so nothing below moves (docs/adr/0005-text-effects-are-spans-moved-by-css.md). {% endcomment %} {% load text_effects %} {% with line=text|plain pace=speed|floatformat:'-3u'|default:'1' %} {{ line|escape }} {# djlint:off #} {# djlint:on #} {% endwith %}