Typed Mark

@sushindustries/ui

Types a word out one character at a time, cycling the syntax palette. No JavaScript, no state, and it runs with scripting off.

5 min read
View as MarkdownEdit on GitHub

A word typed out one character at a time in the CLI's syntax colours, built entirely in CSS with no JavaScript and no state - the markup renders once and the animation is a stagger delay per character. Reach for it for a short name or phrase that should feel alive without costing a re-render.

Viewport width
Phone22remthe floor, the narrowest this promises to work at
tanstacktanstack add https://adamjurek.com/r/tanstack/typed-mark.jsonshadcnpnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/typed-mark.json

Why it is built this way

The obvious build is a useState counter and a setInterval, which costs a re-render per character, can't render on the server, and shows the whole word for one frame before the effect even runs. This renders the finished markup once and lets CSS decide when each character becomes visible, so the server and the client agree, the animation survives JavaScript being off, and a five-character word costs the same as a fifty-character one.

Install commands are not written here

Anything in packages/ui/registry.ts gets its TanStack and shadcn commands attached automatically, so there is nothing to keep in sync.

Install

tanstack add https://adamjurek.com/r/tanstack/typed-mark.json
shell
pnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/typed-mark.json
shell
pnpm add @sushindustries/ui @sushindustries/atoms
shell

What you get

Version0.1.0
Categorymotion · Text effects
Filestyped-mark.tsx
DependenciesNone
Tagstype, css-only, no-js, a11y, no-deps

No runtime dependencies

It brings nothing with it beyond the stylesheet.