Reeded Glass

Soft light refracted through a pane of fluted glass.

Still frame of Reeded Glass: soft light refracted through a pane of fluted glass
Still frame

Installation

pnpm dlx shadcn@latest add @gradients-pro/reeded-glass

Needs a Pro account and the Pro registry setup.

Usage

import { ReededGlass } from "@/components/reeded-glass";

<ReededGlass className="h-[560px]">{children}</ReededGlass>;

It fills its box, so give it a height. Children render on top.

Props

PropTypeDefaultDescription
palette"sunset", "lagoon", "ultramarine""sunset"One of the curated palettes.
appearance"auto", "dark", "light""auto"Which version of the palette to use. auto follows a dark or light class (or data-theme) on <html>, then the OS setting.
colorsstring[]palette2 to 6 CSS colours, var(--x) included. Replaces the palette's colours.
backgroundstringpaletteReplaces the palette's background.
flutesnumber10.25 to 4. How many flutes cross the pane.
refractionnumber0.550 to 1. How strongly each flute bends the light.
frostnumber0.350 to 1. Softer, larger lamps behind the glass.
grainnumber0.10 to 1. Film grain.
speednumber0.60 to 2. How fast it moves; 0 holds a still frame.
paramsPartial<GradientParams>noneAny other engine param, applied last.
classNamestringnoneClasses for the outer box. Give it a size, for example h-[560px].
styleCSSPropertiesnoneInline styles for the outer box.
childrenReactNodenoneContent drawn above the background.