Skip to content
synccn

Typewriter

Types and deletes a list of phrases.

Build your next

Playground

Change the props and copy the code. The controls come from the component's TypeScript types.

Props

typeSpeed70
import { Typewriter } from "@/components/ui/typewriter";<Typewriter words={["components","blocks","themes"]} />

Installation

$ pnpm dlx shadcn@latest add @synccn/typewriter

First time in this project? Connect synccn with one command.

Usage

import { Typewriter } from "@/components/ui/typewriter";<Typewriter words={["fast", "accessible"]} />

API reference

Generated from the component's TypeScript types, so it always matches the code.

Typewriter

Types each phrase, pauses, deletes it, then moves to the next.

  • wordsrequired
    string[]

    Phrases to type.

  • typeSpeed
    number

    Default 70

    Milliseconds per typed character.

  • deleteSpeed
    number

    Default 35

    Milliseconds per deleted character.

  • pause
    number

    Default 1400

    Milliseconds a phrase stays complete.

  • loop
    boolean

    Default true

    Start again after the last phrase.

  • cursorClassName
    string

    Classes for the cursor.

  • className
    string

    Extra classes for the root element.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

  • ARIA attributes: aria-label