BG-02Backgrounds
Background Paths
A ribbon of lines in one color that keeps flowing at any size and parts around the cursor.
PRODither Reveal Hero and more like it are in Kokonut UI Pro
Installation
Background Paths is a free, open-source React component in the Kokonut UI Backgrounds collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/background-paths.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/background-pathsUsage
import BackgroundPaths from "@/components/kokonutui/background-paths";
export default function Example() {
return <BackgroundPaths />;
}Props
classNamestringExtra classes for the root element.
childrenReactNodeContent shown over the lines. Pass null for a bare background.
countnumberDefault 42Number of lines, shared across the three depth layers.
spreadnumberDefault 1How far the ribbon fans out, as a share of the height.
anglenumberDefault -8Tilt of the ribbon, in degrees.
speednumberDefault 1How fast the ribbon flows. 0 holds it still.
interactivebooleanDefault truePart the lines around the cursor.
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.