Width
320px
Height
76px
Border Radius
38px
Distortion Scale
-180
Border Width
0.07
Blur
11px
Brightness
50%
Opacity
0.93
Displace
0.5
Red Offset
0
Green Offset
10
Blue Offset
20
Background Opacity
0.1
Saturation

More components in Pro

Galleries, cards and interactive pieces for pages that need more than the basics.

View all 255
24 properties
childrenReactNodeContent shown on the glass.
widthnumber | string200Width in px, or any CSS value like '100%'.
heightnumber | string80Height in px, or any CSS value like '100vh'.
borderRadius20Corner radius in px. Not used with a shape.
shapeURL of an SVG or transparent PNG that gives the glass its outline, fitted inside the width and height. Files from another origin need CORS headers.
refractionBends what is behind the glass at its edges. Set it to false to use the frosted glass look everywhere.
renderer'auto' | 'svg' | 'webgl''auto'How the glass bends light. Auto uses SVG filters in Chromium, which bend anything behind the glass, and WebGL in Safari and Firefox when a backdrop is given. Without a backdrop, those browsers get a frosted glass look. WebGL forces the WebGL glass whenever a backdrop is given.
backdropRefObject<HTMLImageElement | HTMLVideoElement | HTMLCanvasElement>The image, video or canvas behind the glass. WebGL can only bend what it is given, so pass this to get real refraction outside Chromium. Images from another origin need CORS headers.
distortionScale-180How strongly the edge bends what is behind it. Negative values pull the view inward.
borderWidth0.07Width of the bending edge, as a fraction of the shorter side.
blur11Softness of the transition from the bending edge to the calm center, in px.
brightness50Brightness of the calm center, in %. 50 leaves it undistorted.
opacity0.93How strongly the calm center holds the view still, from 0 to 1.
displaceBlurs the light coming through the glass, for a frosted look.
redOffsetExtra bending for the red channel. Different offsets split light into colored fringes.
greenOffset10Extra bending for the green channel.
blueOffset20Extra bending for the blue channel.
backgroundOpacityOpacity of a soft frosted tint over the glass, from 0 to 1.
saturationSaturation of what is seen through the glass.
xChannel'R' | 'G' | 'B''R'Channel of the displacement map that moves pixels sideways.
yChannel'R' | 'G' | 'B''G'Channel of the displacement map that moves pixels up and down.
mixBlendModeBlendMode'difference'How the two edge gradients of the displacement map are combined.
Extra class names for the glass.
{}Inline styles for the glass.
childrenReactNode

Content shown on the glass.

widthnumber | string

Width in px, or any CSS value like '100%'.

Default200
heightnumber | string

Height in px, or any CSS value like '100vh'.

Default80
borderRadiusnumber

Corner radius in px. Not used with a shape.

Default20
shapestring

URL of an SVG or transparent PNG that gives the glass its outline, fitted inside the width and height. Files from another origin need CORS headers.

refractionboolean

Bends what is behind the glass at its edges. Set it to false to use the frosted glass look everywhere.

renderer'auto' | 'svg' | 'webgl'

How the glass bends light. Auto uses SVG filters in Chromium, which bend anything behind the glass, and WebGL in Safari and Firefox when a backdrop is given. Without a backdrop, those browsers get a frosted glass look. WebGL forces the WebGL glass whenever a backdrop is given.

Default'auto'
backdropRefObject<HTMLImageElement | HTMLVideoElement | HTMLCanvasElement>

The image, video or canvas behind the glass. WebGL can only bend what it is given, so pass this to get real refraction outside Chromium. Images from another origin need CORS headers.

distortionScalenumber

How strongly the edge bends what is behind it. Negative values pull the view inward.

Default-180
borderWidthnumber

Width of the bending edge, as a fraction of the shorter side.

Default0.07
blurnumber

Softness of the transition from the bending edge to the calm center, in px.

Default11
brightnessnumber

Brightness of the calm center, in %. 50 leaves it undistorted.

Default50
opacitynumber

How strongly the calm center holds the view still, from 0 to 1.

Default0.93
displacenumber

Blurs the light coming through the glass, for a frosted look.

redOffsetnumber

Extra bending for the red channel. Different offsets split light into colored fringes.

greenOffsetnumber

Extra bending for the green channel.

Default10
blueOffsetnumber

Extra bending for the blue channel.

Default20
backgroundOpacitynumber

Opacity of a soft frosted tint over the glass, from 0 to 1.

saturationnumber

Saturation of what is seen through the glass.

xChannel'R' | 'G' | 'B'

Channel of the displacement map that moves pixels sideways.

Default'R'
yChannel'R' | 'G' | 'B'

Channel of the displacement map that moves pixels up and down.

Default'G'
mixBlendModeBlendMode

How the two edge gradients of the displacement map are combined.

Default'difference'

Extra class names for the glass.

Inline styles for the glass.

Default{}
Glass Surface — React Component | React Bits