TextRotate

One word in a sentence that changes on its own: "Build it *glass*", then *brutal*, then *soft*.

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

Open TextRotate 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 { TextRotate } from 'rei-kit/motion'
</script>

<template>
  <h1>Build it <TextRotate :words="['glass', 'brutal', 'soft']" /></h1>
</template>

Props

Props
PropTypeRequired or defaultWhat it is for
wordsreadonly string[]yesThe words, in order. The first is the one a server and a still page show.
intervalnumber2400How long each word stays, in milliseconds.
pausedbooleanfalseHolds the current word. For a pause button, or a section out of view.

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