Cycle through an array of phrases with typing, pausing, and deletion between each value.
Fast to compose., Easy to customize., Built for Svelte.|
typewriter-phrases.demo.svelte
<scriptlang="ts">import { Typewriter } from'$lib/components/ui/typewriter';constphrases= ['Fast to compose.', 'Easy to customize.', 'Built for Svelte.'];</script><pclass="text-center text-2xl font-semibold sm:text-3xl"> <Typewritervalue={phrases} loopclass="text-primary"cursorClass="text-muted-foreground" /></p>
Inline text
Insert the span directly into a sentence without introducing a block-level wrapper.
Build a product that feels remarkably polished from the first interaction.
typewriter-inline.demo.svelte
<scriptlang="ts">import { Typewriter } from'$lib/components/ui/typewriter';</script><pclass="max-w-lg text-lg leading-8 text-muted-foreground"> Build a product that feels <Typewritervalue="remarkably polished"startDelay={300}speed={55}class="font-semibold text-foreground"showCursor={false} /> from the first interaction.</p>
Installation
Install directly from the hosted registry with the shadcn-svelte CLI.