Browse docsPanel

Surfaces

Glass Panel

A glass container in a panel, card or pill shape.

Preview

Demos ready. Update 0.

Installation

For React 19+ apps with Tailwind CSS 4.

npx shadcn@4.14.1 add @glassyui/glass-panel

Adds 11 files to components/glassyui and installs clsx.

Usage

Usage

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

export function PanelDemo() {
  return (
    <GlassPanel variant="card" elevation="raised">
      Panel content
    </GlassPanel>
  );
}

Examples

Pill panel

<GlassPanel variant="pill" preset="control">
  Syncing
</GlassPanel>

API reference

GlassPanel

A GlassSurface with shape, spacing and elevation.

PropTypeDefaultDescription
variant'panel' | 'card' | 'pill''panel'Shape and spacing.
elevation'base' | 'raised''base'Shadow and border level.
preset'subtle' | 'standard' | 'prominent' | 'control' | 'showcase''control' for pill, else 'standard'Material strength, as on GlassSurface.
lensbooleantrue for control and showcaseChromium-only rim lens, as on GlassSurface; pills get it by default.
thicknessnumberthickness preferenceGlass thickness as a multiple of regular (1).
refraction'none' | 'soft' | 'strong''strong' for showcase, else 'none'Generated refraction; needs refractionBackground.
refractionBackgroundReactNodeNoneDecorative layer bent inside the panel.
refractionBackgroundSpace'local' | 'viewport''local'Aligns refractionBackground to the panel or to the viewport.
refractionDisplacementnumber72 soft, 112 strongBend strength of generated refraction.
interactivebooleanfalseBrightens the panel slightly on hover.

Also accepts HTML div attributes.

Types
GlassPanelProps