Skip to Content
Kokonut UI

BG-02Backgrounds

Background Paths

A ribbon of lines in one color that keeps flowing at any size and parts around the cursor.

Install with
no extra packages

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-paths

Usage

import BackgroundPaths from "@/components/kokonutui/background-paths";

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

Props

className
string

Extra classes for the root element.

children
ReactNode

Content shown over the lines. Pass null for a bare background.

count
numberDefault 42

Number of lines, shared across the three depth layers.

spread
numberDefault 1

How far the ribbon fans out, as a share of the height.

angle
numberDefault -8

Tilt of the ribbon, in degrees.

speed
numberDefault 1

How fast the ribbon flows. 0 holds it still.

interactive
booleanDefault true

Part the lines around the cursor.

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.