Typewriter with Caret Text
カーソル付きタイプ
Generation Prompt
【対象要素】 - サイト内のテキスト1箇所(見出し・キャッチコピー・リード文等)に適用する 【演出内容】 - テキストが1文字ずつ打ち込まれ、文末には入力カーソルを表す縦線が常に付いてくる - カーソルは一定間隔で点滅し、打ち終わったあとも点滅を続ける 【品質要件】 - 打鍵の間隔は70ms前後、カーソルの点滅は0.9秒周期 - カーソルの点滅は滑らかに消さず、はっきり切り替える - prefers-reduced-motion 時は演出を無効化し、最初から完成した状態で表示する - 演出中も文字が判読できなくなる時間を作らない。レイアウトを揺らさない
[Target element] - Apply to one piece of text on your site (a heading, a tagline, a lead paragraph, etc.) [Motion] - The text is typed one character at a time, with a vertical caret always following the end of the line - The caret blinks at a steady interval and keeps blinking after typing finishes [Quality requirements] - Type at about 70ms per character; blink the caret on a 0.9s cycle - Switch the caret hard on and off rather than fading it - 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.