OPEN-UI

Glass Surface

A glass surface component with blur and distortion effects.

Scroll Down

Install

Use Open-UI CLI or Shadcn CLI to install the component.

Open-UI CLI

Shadcn CLI

Usage

PropDefaultDescriptionType
childrenContent inside the glass surface.ReactNode
width200Width of the surface (number in px or CSS string).number | string
height80Height of the surface (number in px or CSS string).number | string
borderRadius20Border radius in pixels.number
borderWidth0.07Relative border/edge width for the displacement effect (e.g. 0.07).number
brightness50Brightness value for the glass effect.number
opacity0.93Opacity of the glass layer (0–1).number
blur11Backdrop blur amount in pixels.number
displace0Displacement amount for the distortion effect.number
backgroundOpacity0Opacity of the inner background layer.number
saturation1Color saturation of the effect.number
distortionScale-180Scale of the SVG displacement map (negative values invert).number
redOffset0Red channel offset for displacement mapping.number
greenOffset10Green channel offset for displacement mapping.number
blueOffset20Blue channel offset for displacement mapping.number
xChannelRColor channel used for horizontal displacement (R, G, or B).'R' | 'G' | 'B'
yChannelGColor channel used for vertical displacement (R, G, or B).'R' | 'G' | 'B'
mixBlendModedifferenceCSS mix-blend-mode for compositing (e.g. difference, overlay).string
classNameAdditional CSS class for the root container.string
contentClassNameAdditional CSS class for the inner content wrapper.string
styleInline styles for the root element.CSSProperties

Related Components