Skip to content
Dumb UI

Search Dumb UI

Jump to a page or component, or switch the style

Search Dumb UI

Jump to a page or component, or switch the style

Shader Background

An interactive WebGL2 background painted with the active style's colors. Four presets: Press, Satin, Relief and Signal. Follows the pointer, ripples on click.

OriginalsDumb extras
SatinFlowing fabric folds with a soft sheen. The cursor bends the cloth.
$ pnpm dlx shadcn@latest add @dumb/shader-background

Needs the @dumb registry in components.json and the style tokens. See Installation.

import { ShaderBackground } from "@/components/ui/shader-background"
<section className="relative isolate">
  <ShaderBackground className="-z-10" />
  ...
</section>

Every preset side by side, each in the current style's colors.

Presspreset="press"
Satinpreset="satin"
Reliefpreset="relief"
Signalpreset="signal"

API reference

Props marked “extra” are Dumb UI additions. Everything else matches shadcn/ui.

ShaderBackground

PropTypeDefault
presetextra"press" | "satin" | "relief" | "signal"

Pattern. Defaults to the one matching the nearest data-style.

-
interactiveextraboolean

Follow the pointer over the parent element; click for a ripple.

true
speedextranumber

Animation speed. 0 renders a still frame.

1
intensityextranumber

Pattern strength, 0 to 1.

1