Glass Panel

Frosted glass over a live dither field.

Glass Panel on a split sign-in page
Still frame

Installation

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

Needs a Pro account and the Pro registry setup.

Usage

import { GlassPanel } from "@/components/glass-panel";

<GlassPanel className="min-h-[560px] p-10" panelClassName="w-80 p-6">
  {children}
</GlassPanel>;

className lays out the field; panelClassName sizes the glass.

Props

PropTypeDefaultDescription
palette"ultramarine" | "ember" | "mono""ultramarine"A curated ramp that follows light and dark mode. Ignored when colors is set.
kindGradientKind"dither-field"Any registered kind for the field.
colorsstring[]none2 to 6 CSS colours.
backgroundstringvar(--background)Base colour of the field.
tint"light" | "dark"follows the pageFrost toward white or toward black.
frostnumber0.60 to 1. How much the glass blurs what is behind it.
radiusnumber16Corner radius of the panel in pixels.
speednumberkind default0 to 2. How fast the field drifts.
paramsPartial<GradientParams>noneAny other engine param, applied last.
className, styleThe outer box that holds the field. Lay out the panel with it.
panelClassName, panelStyleThe glass panel itself, for size and padding.
asideReactNodenoneContent on the field before the panel, such as a brand column.
childrenReactNodenoneContent inside the glass.