Skip to Content
Kokonut UI

TX-06Texts

Cradle Text

A headline hung like a Newton's cradle, so a knock on one letter clacks through the word, built with React and pendulum physics.

Install with
no extra packages

PROKinetic Type Hero and more like it are in Kokonut UI Pro

Installation

Cradle Text is a free, open-source React component in the Kokonut UI Texts collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/cradle-text.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/cradle-text

Usage

import CradleText from "@/components/kokonutui/cradle-text";

export default function Example() {
  return <CradleText />;
}

Props

text
stringDefault "Momentum"

The line of letters hung from the rail. Keep it to one line.

className
string

Extra classes for the root element.

intro
booleanDefault true

Lift the first letter and let it go once, the first time it's seen.

bounce
numberDefault 0.97

How much speed a collision keeps, 0 to 1. Steel is about 0.95.

Dependencies

NeedsVersionComes from
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.