Skip to content

pastetaste

Drift Ribbons

BackgroundsWebGLAmbientWebGL

Slow ribbons of light with a crisp lower edge and a long streaked tail, drifting across a dark ground. One WebGL shader, zero dependencies.

Paste it into Claude Code: it installs the component, asks for your brand and content, and places it on the page you name.

Install

Or by hand, in a Next.js project with shadcn set up. It writes components/pastetaste/drift-ribbons.tsx.

npx shadcn@latest add https://pastetaste.com/r/drift-ribbons.json

Prompt

Install the pastetaste component "Drift Ribbons" (drift-ribbons) into this Next.js project and use it.

What it is: Slow ribbons of light with a crisp lower edge and a long streaked tail, drifting across a dark ground. One WebGL shader, zero dependencies.

Before you place it, ask me (one short message, in my language; "skip" = sensible default): which page and section it goes in, my brand colour (hex), the text, labels or images it should show, and whether I want my logo or my own copy in the demo content. Then:

Steps:
1. If the project has no components.json, run: npx shadcn@latest init -y -d. Then run: npx shadcn@latest add https://pastetaste.com/r/drift-ribbons.json
   (it writes components/pastetaste/drift-ribbons.tsx; install any npm packages it reports).
2. Import it: import { DriftRibbons } from "@/components/pastetaste/drift-ribbons" (check the file for the exact named export).
3. Put it where it fits on the page I name, keep the rest of the page untouched, and pass props for my colours instead of editing the installed file.
4. It does not depend on Tailwind; colours come from CSS variables (--pt-*) or props.
5. It uses WebGL: render it in a client component and give it a fixed-height parent; it pauses off-screen and shows a still frame for reduced motion.

Props (all optional unless the type has no default):
- colors: string[] = ['#3dffb0','#2fb8c9','#f2d46b','#ff7a59'] — One to four ribbon colours, bottom to top; CSS colours or var().
- background: string = '#05090b' — Ground colour, also painted behind the canvas as the no-WebGL fallback.
- ribbons: number = 3 — Number of ribbons, 1 to 4.
- speed: number = 1 — 1 is one slow swell in about 30 s; 0 freezes the sky.
- intensity: number = 1 — Brightness multiplier.
- softness: number = 1 — Width of the ribbons; above 1 they melt into each other.
- horizon: number = 0.5 — Where the middle ribbon sits, 0 bottom to 1 top.
- quality: number = 0.8 — Render scale against CSS pixels; lower is cheaper and softer.

Live preview: https://pastetaste.com/c/drift-ribbons
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.

Props 8

PropTypeDefaultDescription
colorsstring[]['#3dffb0','#2fb8c9','#f2d46b','#ff7a59']One to four ribbon colours, bottom to top; CSS colours or var().
backgroundstring'#05090b'Ground colour, also painted behind the canvas as the no-WebGL fallback.
ribbonsnumber3Number of ribbons, 1 to 4.
speednumber11 is one slow swell in about 30 s; 0 freezes the sky.
intensitynumber1Brightness multiplier.
softnessnumber1Width of the ribbons; above 1 they melt into each other.
horizonnumber0.5Where the middle ribbon sits, 0 bottom to 1 top.
qualitynumber0.8Render scale against CSS pixels; lower is cheaper and softer.
View all →