Extruded Text - React Component | Kokonut UI
Extruded Text
Zinc 3D extruded text lit by your pointer, with letters that press in like keycaps.
Install with npm:
Add the swoosh-text component from Kokonut UI to this project with npx shadcn@latest add https://kokonutui.com/r/swoosh-text.json, then show me how to use it.
no extra packages
ExtrudedEEEEEEEEEEEEExxxxxxxxxxxxxtttttttttttttrrrrrrrrrrrrruuuuuuuuuuuuudddddddddddddeeeeeeeeeeeeeddddddddddddd
Installation
Extruded 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/swoosh-text.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/swoosh-text
Usage
import SwooshText from "@/components/kokonutui/swoosh-text";
export default function Example() {
return <SwooshText text="Extruded" />;
}
Props
text
string Default "Extruded"
as
"div" | "span" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" Default "div"
Element to render, e.g. "h1" for a heading.
depth
number Default 12
Stacked layers behind each letter (clamped to 6-16).
length
number Default 0.2
Total extrusion length, in em.
accent
string
Optional color for the deepest layer only, e.g. "#f97316".
Also takes every prop of Omit<HTMLAttributes<HTMLElement>, "children">.
Dependencies
| Needs | Version | Comes from |
|---|---|---|
cn from lib/utils.ts |
shadcn init | |
| React | 19 |
Your app |
| Tailwind CSS | 4 |
Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.
On this page
[Glitch Text\
Flat text that cuts into hard-shifted bands with a thin red/cyan split, on idle, hover or text change.](/content/docs/texts/glitch-text/index.html)
[Plucked Text\
A headline sitting on a string you can pluck, strum and let ring, built with React and real string physics.](/content/docs/texts/plucked-text/index.html)