TypeWriter

Text that types itself out, and — given several lines — deletes each one and types the next.

Import it from rei-kit/motion: import { TypeWriter } from 'rei-kit/motion'

Open TypeWriter in the live documentation, where every prop below is a control you can change, in four materials and ten palettes.

Usage

<script setup lang="ts">
import { TypeWriter } from 'rei-kit/motion'
</script>

<template>
  <TypeWriter :text="['Write it once.', 'Change the look.', 'Ship it.']" />
</template>

Props

Props
PropTypeRequired or defaultWhat it is for
textstring | readonly string[]yesOne line to type, or several to type in turn.
speednumber45Milliseconds per character typed.
deleteSpeednumber25Milliseconds per character deleted.
holdnumber1800How long a finished line stays before it is deleted, in milliseconds.
loopbooleantrueWith several lines, start again after the last. With one, it is typed once.
cursorbooleantrueShow a blinking caret after the text.
pausedbooleanfalseStops where it is.

About rei-kit

rei-kit is an accessible Vue 3 and Tailwind CSS 4 component library: 106 components, themed by role rather than by colour on three independent axes — ten WCAG-checked palettes, four materials and light or dark, each switched with one attribute. Typed, tested, SSR-safe, no runtime dependencies, MIT.

pnpm add rei-kit · npm · GitHub