Skip to content
Textlab
1
Browse

ComponentsKinetic

Kinetic beat

Words hit on a beat.

Make it loud tonight

Installation

$ npx shadcn@latest add @textlab/kinetic-beat

Needs @textlab in your components.json. Setup takes a minute.

Usage

usage.tsx
import { KineticBeat } from "@/components/textlab/kinetic-beat/kinetic-beat";

<KineticBeat text="Make it loud" bpm={128} variant="slam" />

Variants

popslambounce

Props

PropTypeDefaultDescription
text*string–Words to hit, one per beat.
variant"pop" | "slam" | "bounce""pop"Scale up with overshoot, crash down from large, or hop in.
bpmnumber120Beats per minute.
loopbooleantrueStart over after the last word.
restnumber2Silent beats at the end of each loop.
asElementType"div"Rendered element.
reducedMotion"user" | "always" | "never""user"user follows the OS setting; always shows the still version.
classNamestring–Merged onto the root.

When to use it

Reach for it

  • Music, events and launch teasers.
  • Short punchy slogans of three to six words.

Skip it

  • Information people need to read at their own pace.
  • Long sentences.

Accessibility and motion

Accessibility

  • The whole sentence is read once from a hidden copy.
  • Pauses when scrolled out of view.

Motion

  • One word per beat; at 120 BPM that is two words a second.
  • Exits are quick so each hit lands clean.
Reduced motion. The sentence appears whole and still.

Performance

  • One interval and one animated word at a time.