Skip to Content
Kokonut UI

TX-07Texts

Spoiler Text

Inline text hidden under drifting specks, like a chat spoiler. A click blows the specks away from the point you touched.

Install with
no extra packages

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

Installation

Spoiler 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/spoiler-text.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/spoiler-text

Usage

import SpoilerText from "@/components/kokonutui/spoiler-text";

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

Props

className
string

Extra classes for the root element.

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.