Type and Delete Loop Text
打つ→消す→次の語
Generation Prompt
【対象要素】 - サイト内のテキスト1箇所(見出し・キャッチコピー・リード文等)に適用する 【演出内容】 - 語が1文字ずつ打ち込まれ、少し留まったあと1文字ずつ消され、続けて次の語が打たれる - これを語のリストで繰り返し続ける 【品質要件】 - 打つのは70ms/文字、消すのは45ms/文字。打ち終わったあとに1秒ほど留める - 表示幅は最長の語に合わせて固定し、切り替えでレイアウトを動かさない - prefers-reduced-motion 時は演出を無効化し、最初から完成した状態で表示する - 演出中も文字が判読できなくなる時間を作らない。レイアウトを揺らさない
[Target element] - Apply to one piece of text on your site (a heading, a tagline, a lead paragraph, etc.) [Motion] - A word is typed one character at a time, held briefly, deleted one character at a time, and the next word is typed - This repeats through a list of words [Quality requirements] - Type at 70ms per character and delete at 45ms; hold about one second once typed - Fix the width to the longest word so switching does not move the layout - When prefers-reduced-motion is set, disable the animation and show the finished state from the start - Never let the text become unreadable during the animation, and never shift the surrounding layout
Prompts and demo code are free to use in your own projects. See About.