Look closer.
More components in Pro
Galleries, cards and interactive pieces for pages that need more than the basics.
text | 'Look closer.' | Headline drawn behind the glass, so the glass can bend it. Use \n for line breaks. It takes the font and color of the container unless you set them. | |
src | Image or video behind the glass. Videos (.mp4, .webm, .mov) play muted on a loop. Files from another site need CORS headers. | ||
fit | 'cover' | 'contain' | 'cover' | How the image or video fills the area. |
background | 'transparent' | Color behind the text and media. Transparent lets your page show through. | |
textColor | Inherited | Color of the text. Defaults to the CSS color. | |
fontFamily | Inherited | Font of the text. Defaults to the font of the container. | |
fontWeight | number | string | 600 | Weight of the text. |
fontSize | Auto | Size of the text in px. By default it scales to fill the width. | |
shape | 'torus' | 'lens' | 'blob' | 'pill' | 'cube' | 'prism' | 'diamond' | 'torus' | Shape of the glass. The blob is a drop of liquid glass that keeps rippling. Changing the shape melts the glass smoothly into the new one. |
shapes | string[] | All shapes | Shapes the glass cycles through when clicked. |
morphOnClick | Clicking the glass melts it into the next shape. | ||
size | 260 | Diameter of the glass in px. It shrinks to fit small areas. | |
interaction | 'follow' | 'drag' | 'static' | 'follow' | How the glass responds: it glides after the cursor, it can be picked up and thrown around, or it stays in place. |
position | [number, number] | [0.5, 0.5] | Where the glass rests, as fractions of the width and height. |
refraction | How strongly the glass bends light, from 0 to 2. Around 0.66 behaves like water. | ||
dispersion | 0.35 | How much light splits into rainbow fringes at the edges, from 0 to 1. | |
frost | Frosts the glass so what is behind it blurs, from 0 to 1. | ||
color | '#ffffff' | Color of the glass. | |
tint | How strongly the glass takes on its color. Thicker parts look deeper, like real colored glass. | ||
reflection | Strength of the highlights and reflections on the surface, from 0 to 2. | ||
shadow | 0.5 | Strength of the shadow and the focused light the glass casts below it, from 0 to 1. | |
elevation | 0.4 | How high the glass floats above the content. Higher magnifies more, until the image flips. | |
smoothness | 0.5 | How lazily the glass follows, from 0 (snappy) to 1 (floaty). | |
wobble | 0.5 | How much the glass stretches when it moves and wobbles when it stops, like a liquid. 0 keeps it rigid. | |
spin | 0.3 | Idle rotation speed for shapes like the cube and the torus. Negative values spin the other way. | |
idle | The glass drifts gently around its resting place while nobody interacts. | ||
| The glass pops into place on mount. | |||
maxDevicePixelRatio | 2 | Highest pixel ratio the canvas renders at. | |
children | ReactNode | Content layered on top, such as buttons. It sits above the glass and is not bent by it. | |
| Extra class names for the container. | |||
| Inline styles for the container. |
textstringHeadline drawn behind the glass, so the glass can bend it. Use \n for line breaks. It takes the font and color of the container unless you set them.
'Look closer.'srcstringImage or video behind the glass. Videos (.mp4, .webm, .mov) play muted on a loop. Files from another site need CORS headers.
fit'cover' | 'contain'How the image or video fills the area.
'cover'backgroundstringColor behind the text and media. Transparent lets your page show through.
'transparent'textColorstringColor of the text. Defaults to the CSS color.
InheritedfontFamilystringFont of the text. Defaults to the font of the container.
InheritedfontWeightnumber | stringWeight of the text.
600fontSizenumberSize of the text in px. By default it scales to fill the width.
Autoshape'torus' | 'lens' | 'blob' | 'pill' | 'cube' | 'prism' | 'diamond'Shape of the glass. The blob is a drop of liquid glass that keeps rippling. Changing the shape melts the glass smoothly into the new one.
'torus'shapesstring[]Shapes the glass cycles through when clicked.
All shapesmorphOnClickbooleanClicking the glass melts it into the next shape.
sizenumberDiameter of the glass in px. It shrinks to fit small areas.
260interaction'follow' | 'drag' | 'static'How the glass responds: it glides after the cursor, it can be picked up and thrown around, or it stays in place.
'follow'position[number, number]Where the glass rests, as fractions of the width and height.
[0.5, 0.5]refractionnumberHow strongly the glass bends light, from 0 to 2. Around 0.66 behaves like water.
dispersionnumberHow much light splits into rainbow fringes at the edges, from 0 to 1.
0.35frostnumberFrosts the glass so what is behind it blurs, from 0 to 1.
colorstringColor of the glass.
'#ffffff'tintnumberHow strongly the glass takes on its color. Thicker parts look deeper, like real colored glass.
reflectionnumberStrength of the highlights and reflections on the surface, from 0 to 2.
shadownumberStrength of the shadow and the focused light the glass casts below it, from 0 to 1.
0.5elevationnumberHow high the glass floats above the content. Higher magnifies more, until the image flips.
0.4smoothnessnumberHow lazily the glass follows, from 0 (snappy) to 1 (floaty).
0.5wobblenumberHow much the glass stretches when it moves and wobbles when it stops, like a liquid. 0 keeps it rigid.
0.5spinnumberIdle rotation speed for shapes like the cube and the torus. Negative values spin the other way.
0.3idlebooleanThe glass drifts gently around its resting place while nobody interacts.
introbooleanThe glass pops into place on mount.
maxDevicePixelRationumberHighest pixel ratio the canvas renders at.
2childrenReactNodeContent layered on top, such as buttons. It sits above the glass and is not bent by it.
Extra class names for the container.
Inline styles for the container.



