Typewriter
A copy-paste text effects component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Text EffectsHTMLCSSany framework
Copy into your project
HTML
<!-- Typewriter — text types character by character with blinking cursor -->
<div class="nuda-typewriter">
<span class="nuda-typewriter__text">Welcome to NudaUI.</span>
</div>CSS
/* ── Typewriter ─────────────────────────────────────────────
Customize:
--nuda-tw-speed : total typing duration
--nuda-tw-steps : number of characters in your text
--nuda-tw-cursor-clr : cursor color
--nuda-tw-cursor-w : cursor width
──────────────────────────────────────────────────────────── */
.nuda-typewriter {
--nuda-tw-speed: 2.8s;
--nuda-tw-steps: 19; /* update to match character count */
--nuda-tw-cursor-clr: currentColor;
--nuda-tw-cursor-w: 3px;
font-family: monospace;
display: inline-block;
}
.nuda-typewriter__text {
display: inline-block;
overflow: hidden;
white-space: nowrap;
border-right: var(--nuda-tw-cursor-w) solid var(--nuda-tw-cursor-clr);
width: 0;
animation:
nuda-typewriter-type var(--nuda-tw-speed) steps(var(--nuda-tw-steps)) forwards,
nuda-typewriter-blink 0.7s step-end infinite;
}
@keyframes nuda-typewriter-type {
to { width: 100%; }
}
@keyframes nuda-typewriter-blink {
50% { border-color: transparent; }
}
/* ── Accessibility ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
.nuda-typewriter__text {
animation: none;
width: 100%;
border-right-color: transparent;
}
}How to use Typewriter
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.