@glass-sdk/liquid-glass 0.0.3-beta.0 → 0.0.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,158 +1,50 @@
1
1
  # Changelog
2
2
 
3
- ## 0.0.3-beta.0: Glass measured on macOS 27, much faster in Chromium, and a sharper lens
3
+ ## 0.0.3: Glass measured on macOS 27, and much faster in Chromium
4
4
 
5
5
  _2026-11-22_
6
6
 
7
7
  ### New
8
8
 
9
- - `GlassRow`: a row in a glass panel, as a menu's items are. Where it nears the panel's corners it follows their curve moved inward, and its side padding keeps its content clear of the curve. Use it for a select's options or a command palette's results, so every list on glass has the same concentric rows. Glass menus now use it.
10
- - `tint` takes any CSS color in the DOM scene, including a theme variable such as `var(--accent)` or an `oklch()` color. It resolves where the glass is and follows the variable as the theme changes.
11
-
12
- - `specular` lights the rim of glass with two equal highlights on opposite corners, top left and bottom right at rest, as on iOS. They turn around the glass to face the pointer, and follow the device's tilt where the browser reports it without asking for permission (Android). It is off by default. Set it on a scene, or on any surface or control:
13
-
14
- ```tsx
15
- <GlassScene specular>
16
- …
17
- </GlassScene>
18
-
19
- <GlassButton specular>Get started</GlassButton>
20
- ```
21
-
22
- The highlight is drawn on a small layer inside each surface, so moving the light never redraws the content filter. Reduced motion keeps them at rest; reduced transparency and forced colors hide it.
23
-
24
- - `GlassColorPicker` is a hue and saturation wheel. A small dot of the chosen color marks it exactly; pressing the wheel grows the dot into a Lens glass bubble that follows the pointer, with a point at its center on the exact color:
25
-
26
- ```tsx
27
- const [color, setColor] = useState("#0a84ff");
28
-
29
- <GlassColorPicker value={color} onValueChange={setColor} name="color" />;
30
- ```
31
-
32
- Arrow keys change hue and saturation. Set `--lg-backdrop` to the color behind the picker, so the lens refracts it at the wheel's edge.
33
-
34
- - `--lg-backdrop` gives glass a body over transparent content. Glass takes its look from what is behind it, so a control in a small scene of its own, over nothing, showed only its rims while a menu over the app had a frosted body. Set the variable to the color behind the scene, on the scene or any ancestor, and Regular and Clear glass treat it as their backdrop wherever the content is transparent, looking as they would over content of that color:
35
-
36
- ```css
37
- .toolbar {
38
- --lg-backdrop: var(--window-background);
39
- }
40
- ```
41
-
42
- ```tsx
43
- <GlassScene className="toolbar">
44
- <GlassContent />
45
- <GlassTabs aria-label="View" items={items} />
46
- </GlassScene>
47
- ```
48
-
49
- The color paints only through the glass: the content and the space around the glass stay transparent, so a scene can still sit over a transparent window. A new color applies without rebuilding the filter. Unset, glass draws exactly as before.
50
-
51
- - `GlassSwitch` and `GlassSlider` accept `disabled`. A disabled control is dimmed, ignores pointer, drag and keyboard input, and is announced as disabled; a disabled switch also leaves the tab order, and its form input is disabled:
52
-
53
- ```tsx
54
- <GlassSwitch disabled checked={sync} onCheckedChange={setSync} aria-label="Sync" />
55
- <GlassSlider disabled aria-label="Volume" defaultValue={50} />
56
- ```
9
+ - `GlassColorPicker`: a hue and saturation wheel whose dot grows into a Lens bubble while you drag.
10
+ - `GlassRow`: a row that follows the curve of the glass panel it sits in, as menu items do.
11
+ - `GlassPopupSurface`: glass for dialogs and popovers that stays hidden until its glass is drawn.
12
+ - `specular`: two rim highlights that turn toward the pointer, and with the device's tilt on Android.
13
+ - `frost` (0 to 1) moves Regular and Clear glass from see-through to frosted.
14
+ - `floating` gives menus, popovers and dialogs the deeper shadow macOS casts for them.
15
+ - `--lg-backdrop` gives glass a body over transparent content. Set it to the color behind the scene.
16
+ - `--lg-accent` colors a slider's fill and a switch's track from CSS.
17
+ - `tint` takes any CSS color, including a theme variable such as `var(--accent)`.
18
+ - `GlassSwitch` and `GlassSlider` accept `disabled`, and a switch follows its own `width` and `height`.
57
19
 
58
20
  ### Improved
59
21
 
60
- - Tabs move as macOS 27's do, measured on its tabs. The chosen tab rests on a small plate of glass; pressing lifts a magnifying Lens out of it that grows past the tab, and the plate fades beneath it. Dragging carries the lens with the pointer at the size it lifted at, instead of resizing it to every label it passes over, so it no longer jitters between widths; it squashes with speed, wobbles as it stops, and takes an end tab's size only at either end of the bar. Letting go settles it onto the tab under its centre at that tab's size. The bar no longer grows under a press unless `interactive` is set. The lifted lens bends in a thin band at its rim with colored fringes there, as macOS's pressed controls do, while what is under its middle stays sharp; pressed switch and slider thumbs use the same lens.
61
-
62
- - A lifted lens (a pressed tab, switch or slider thumb) looks like macOS's: a crisp outline all round, no rim light, and color fringes all round its rim that read as thin tints rather than single red, green and blue pixels. The colors part on a field of their own, wider and gentler than the bend, and the rim reads a slightly softened copy of what is behind it, as a GPU's smaller mip level would be, because Chromium's displacement picks whole pixels where macOS averages them. The middle of the lens stays exactly sharp.
63
-
64
- - Dragging a tab bar's lens keeps it exactly under the pointer between the bar's ends, as on macOS; it used to trail behind through a short spring, by more the faster you moved. Its speed carries on when you let go or reach an end. The lens's glass takes its look from its layout size, so stretching and wobbling no longer rebuild its filter every frame, and its maps fit it at any length, so it never swaps them when it comes to rest.
65
-
66
- - Glass is much faster in Chromium and Electron. Each surface now draws its own glass as its own backdrop filter, instead of the scene filtering its whole content layer, so hovering a menu row, opening a popup or typing under glass redraws only the glass over it rather than the whole window. A filter carries only small tiles of each map: four corners and the single row and column between them. In Glass's desktop app, hovering an open menu went from about 8 to over 40 frames a second. In Chromium, surfaces get inline `backdrop-filter`, `border-radius` and `box-shadow` while they are added, and a surface with glass inside it draws its glass on its `::before`; see [Without React](../packages/liquid-glass/README.md#without-react).
67
-
68
- - `GlassPopupSurface` is exported: glass that opens over the page, such as a dialog or a popover, keeps its contents hidden until its glass is drawn, as menus do, so it never shows as text that its glass catches up with.
69
-
70
- - The glass engine loads on its own, after the page. Importing the package brings in only its React components: 4 KB of gzip for a surface and 89 KB for everything, instead of 45 KB and 132 KB. A scene starts loading the engine as it mounts, and its surfaces join the glass when it arrives, long before a menu or dialog is opened. Shape outlines (`GlassRow`, concentric and fixed shapes) load the same way, and `GlassSlider` and `GlassSwitch` no longer bring each other in.
71
-
72
- - Frosting is Chromium's own `blur()`, run before the glass filter, instead of an SVG blur inside it; it costs a fraction as much, which matters most for glass holding a scrolling list. The map tiles of a filter lie on device pixels and are joined in one pass, and maps under 320 by 320 pixels are no longer cut into tiles at all.
73
-
74
- - Glass changes with its size, as on macOS 27, where every value of the glass filter follows the shorter side of the shape. Measured on `NSGlassEffectView` at 31 sizes and checked against captures over black, gray, white, text and a photo:
75
- - Glass up to 64px (buttons, capsules, toolbar groups) stays nearly clear: text behind it remains readable, bright backdrops stay brighter in dark appearance, and the rim bends by half the height instead of a fixed 60px.
76
- - From 64px to 160px glass gathers its panel look: frost, a darker face in dark appearance and a wide, soft shadow.
77
- - Regular glass blends a softer copy of its backdrop into its face, keeping the darker of the two in dark appearance and the lighter in light, so fine bright detail melts on dark glass and fine dark detail on light glass while the rest stays sharp.
78
- - The rim matches macOS's, measured on native glass over black, gray, white and a photo:
79
- - The key light from above and the fill light from below now add to the glass instead of painting white over it, so they read the same over light and dark backdrops (+62 levels on Regular, more on Clear over brighter backdrops). They fall off within about a pixel and a half and fade out around the shape by 70 degrees, rather than wrapping into the corners.
80
- - The outline darkens the backdrop's outermost pixel all the way around the shape, by an amount that depends on what is behind it, as macOS does, instead of a black line on the sides only.
81
- - Regular glass shades its face faintly along a ring a few pixels inside its top and side edges.
82
- - Small glass keeps more of the color behind it: less saturation on controls and on Clear glass.
83
- - Material maps now have three planes (field, rim and light) instead of two; `MaterialMaps.overlay` is replaced by `rim` and `light`.
84
- - Menus open and close cleanly. Submenus open the moment the pointer reaches their item (`GlassMenuSubmenuTrigger` `delay` now defaults to 0). A popup closing stays on screen while the popup opening in its place waits for its glass, so moving between submenus never leaves a gap; a new popup shows its contents only once its glass is drawn. Menus are placed in viewport coordinates, so they no longer start offset by the scene's position and jump into place, and anchored to their trigger's layout box, so a press that grows the glass around the trigger (a toolbar, a button) no longer moves the open menu.
85
- - Glass costs less to draw: Clear glass skips its blur (it was too small to see) and draws its tone in one pass, a Lens with no tone draws none, and Regular panels reuse their frost for the softer copy instead of blurring twice. `aberration` turns on a Lens's colored fringes, which pressed switch and slider thumbs use; other lenses, such as a tab bar's selection, no longer pay for them.
86
- - The rim's edge pixel no longer lets the page behind show through. The content under glass is now cut away only where the glass covers it fully, and the lit face is masked once, so a partly covered edge pixel blends exactly. Over a light page this showed as a bright line just inside the outline, which made the outline look heavier than macOS's.
87
- - The outline fades out by 45 degrees around a corner, as on macOS, and dark Regular glass darkens bright backdrops more with its outline, controls a little and panels up to 71%. The rim light reaches a little further around corners.
88
- - Glass that floats (menus, popovers, dialogs, and any surface with `floating`) looks like a panel at any size, so a two-item submenu and a long one look alike.
89
- - A surface's look (material, appearance, tint, frost, refraction, `floating`, `aberration`) now changes in place, through the new `GlassSceneController.updateSurface`, instead of removing and adding the surface again. Switching a scene between Clear and Regular no longer redraws its glass from scratch or moves anything anchored to it, such as an open menu.
90
- - A switch's thumb springs along its own track, never toward where it sits on screen: a switch in a menu no longer slides when the menu opens or moves into place, and its new side never shows for a frame before the spring starts. A new popup stays hidden for one more frame after its glass is drawn, while its rows settle into the shape the scene gives them.
91
- - Tinted glass no longer breaks its scene: the tint and tone passes gave two filter results the same name, so the browser rejected the whole filter.
92
- - `refraction` now defaults by size: half the shorter side up to 60px for Regular, 0.65 of it for Clear, a quarter for Lens.
93
- - `floating` gives glass that floats above the window, such as menus, popovers and dialogs, the deeper shadow macOS casts for them. Popup surfaces and menus set it.
94
- - Pressed thumbs lift as macOS's do. A switch's grows to about 1.55 times its size (a 32x20 thumb to 50x31) and a slider's to 1.25 times, over 210ms. The lens magnifies the track, passes its pixels unchanged, shows colored fringes where it bends, and casts a faint ring. While dragged it stretches up to 2.5% along its path and wobbles once when it stops, instead of stretching up to 18%. The switch track brightens while its thumb is held.
95
- - Interactive glass responds to a press as macOS glass does: it grows 2.5px wider at any size, keeping its proportions, rather than by a share of its size; a 36px light gathers under the pointer and the face brightens a little; on release it settles back in about 200ms, dipping just under its size. A drag no longer stretches it.
96
-
97
- - Glass looks like macOS's. Its materials follow the filter values Core Animation gives `NSGlassEffectView` in an active window on macOS 27, checked against captures over black, gray, white, text and a photo in both appearances, to within a few levels of brightness:
98
- - **Clear** keeps the backdrop sharp, lifts it (black reads as 12% gray, colors keep their saturation) and bends it at the rim, in either appearance.
99
- - **Regular** compresses bright backdrops in dark appearance and lifts dark ones in light, keeping their hue, and casts a faint shadow around itself.
100
- - **The rim** carries a key light along the top and bottom, white on its outer edge and fading over a few pixels, and a fine dark line just outside the sides, instead of an even outline.
101
- - Each surface frosts with one blur instead of two blurs blended together, which costs less.
102
- - `frost` (0 to 1) moves Regular and Clear glass from see-through to frosted, like the Liquid Glass slider in macOS's Appearance settings. Set it on a scene, a surface or a control:
103
-
104
- ```tsx
105
- <GlassScene material="regular" frost={0.5}>
106
- …
107
- </GlassScene>
108
- ```
109
-
110
- - `GlassSwitch` follows its own size. Set its `width` and `height` and the thumb fills the height inside the padding at a 32:20 ratio and travels the width that remains, in left-to-right and right-to-left text. You no longer need to style `.lg-switch-thumb` or `--lg-switch-travel`, which is gone. The default 54 × 24 switch looks the same as before:
111
-
112
- ```tsx
113
- <GlassSwitch aria-label="Wi-Fi" style={{ width: 44, height: 20 }} />
114
- ```
115
-
116
- - Menus open and close at once: the glass no longer rebuilds its filter on every frame while a menu appears or leaves.
117
- - The scene no longer prepares maps along animation paths, blends maps between shapes, or merges a popup's glass with its trigger's. Each surface draws the one map of its shape.
118
-
119
- - A slider's fill and a switch's "on" track can be colored from CSS with `--lg-accent`, including a theme's CSS variable, when no `tint` is set. Before, the default gray was written on the element and no stylesheet could change it.
120
-
121
- - Pressed and dragged glass stays where it is. It grows under a press and stretches toward a drag in place, instead of following the pointer off its spot, and it grows and stretches about a third less. Switch thumbs and the tab bar's lens still slide along their track.
122
-
123
- ### Breaking changes
124
-
125
- - `GlassTabsIndicator` is now the resting plate, `material="regular"` by default instead of `"lens"`; the lens appears only under a press, in an element of its own in the scene's root. `GlassTabsList` defaults to `interactive={false}`. `attachSelectionLens` takes the lens through the returned `setLens(lens, root)` and an optional `onLifted` callback, and returns a `SelectionLens`.
126
-
127
- - Materials changed look; see Improved. `material` now defaults to `"regular"`, as on macOS, instead of `"clear"`. A new `"lens"` material is the old unfrosted look, for magnifiers: pressed control thumbs, the tab bar's selection and the color picker use it. To keep glass that does not frost, use `material="lens"`.
128
- - `@glass-sdk/liquid-glass/core` no longer exports `materials`. `glassRecipe(options)` returns the frost and tone a material uses, and `refraction` its default rim travel.
129
-
130
- - Morphing menus and toolbars are removed. `GlassSurface` no longer accepts `morphFrom`, `morph`, `neck`, `morphEnter` or `fluid`, and `GlassMenuContent` no longer accepts `morph` or `neck`. Remove those props:
131
-
132
- ```diff
133
- - <GlassSurface morphFrom={triggerRef} morph="detach" fluid>
134
- + <GlassSurface>
135
- ```
136
-
137
- Toolbar groups created by a new `GlassToolbarSpacer` now appear in place instead of splitting off their neighbor.
138
-
139
- - `@glass-sdk/liquid-glass/dom` no longer exports `attachGeometryMotion`, `radiusPixels`, `GeometryAnimator`, `GeometryMotionOptions`, `GlassMorph`, `LensFrame`, `LensPlacement` or `LensWaypoint`. `SurfaceOptions` drops `morphFrom`, `morph`, `fluid`, `neck` and `morphEnter`, and gains `popup` for a surface whose scene should rise above sibling scenes while it is present. `SurfaceAnimator.frame` no longer receives a `quiet` argument.
140
- - `@glass-sdk/liquid-glass/core` no longer exports `smoothUnion`, `smoothMin`, `roundRectDistance` or `RoundRect`, and `springs.morph` is gone.
141
- - `GlassMorph` is no longer exported from the package root.
22
+ - Materials follow macOS 27's glass, measured on `NSGlassEffectView` in both appearances. Glass changes with its size: small controls stay nearly clear, and panels gather frost and shadow.
23
+ - The rim is lit and outlined as on macOS.
24
+ - Each surface draws its own glass as a backdrop filter in Chromium and Electron, so a change redraws only the glass over it. Hovering an open menu runs about five times as fast.
25
+ - The glass engine loads after the page: importing a surface costs 4 KB gzipped instead of 45 KB.
26
+ - Tabs move as macOS 27's do: the selection rests on a glass plate, a press lifts a magnifying lens, and dragging keeps it exactly under the pointer.
27
+ - A pressed lens is sharp, with a crisp outline and soft color fringes all round its rim.
28
+ - Pressed switch and slider thumbs lift into a lens at macOS's sizes and timing.
29
+ - Interactive glass grows 2.5px under a press and settles back in about 200ms.
30
+ - Menus open at once and open submenus as soon as the pointer reaches them.
31
+ - In Safari, a scene with a lot of glass on screen draws a simpler filter instead of shifting or losing its glass, and Regular glass casts its shadow as a box shadow, so it costs little more than Clear.
32
+ - In Firefox, glass over other glass shows the labels and icons on it, so a tab bar's lens magnifies the tabs it passes.
33
+ - A scene given more surfaces than `maxSurfaces` reports it through `onDiagnostic` instead of throwing.
142
34
 
143
35
  ### Fixed
144
36
 
145
- - In Chromium, a glass surface holding other glass (a dialog with a glass close button, a toast with a glass action) keeps its glass while it fades or scrolls. Fading it used to cut its glass off from the page, which showed as a flat color while it moved, and scrolling it carried its glass away with its content.
146
-
147
- - Rows of a scrolling list (`GlassRow` in a scrolling menu or palette) no longer shift sideways while it scrolls. Each row took its shape and text padding from where scrolling had put it against the panel's rounded corners, so the padding of every row grew and shrank as rows passed under them. Rows now take their shape from where they lie in the list: the first meets the top corners and the last the bottom ones, as when scrolled to.
148
-
149
- - Glass of a size not drawn before, such as a dialog the first time it opens, appears with its dialog instead of a few hundred milliseconds later. A scene readies the GPU map renderer and the map encoder while the page is idle, so a new map waits only for itself.
37
+ - In Safari, `GlassContent layout="scroll"` no longer draws blank while the page is zoomed.
150
38
 
151
- - A popup whose maps were still decoding when it was shown no longer stays without glass until it is opened again. A popup now waits for its glass (glass of a new size takes a few hundred milliseconds, once), and shows without it at once only when its glass cannot be drawn.
152
-
153
- - Glass no longer draws an older, wrong-size map after a newer one: a map held back to warm up could land after the newer one and stay for as long as the surface showed, stretched to fit. A capsule shorter than its two ends, such as a lens growing out of a tab, cuts its ends instead of squeezing them.
39
+ ### Breaking changes
154
40
 
155
- - A newly mounted glass popup remains focusable while its outline is measured, so dialogs can focus their first field as they open.
41
+ - `material` defaults to `"regular"`. The new `"lens"` material is the old unfrosted look.
42
+ - Morphing is removed: `morphFrom`, `morph`, `neck`, `morphEnter` and `fluid` are gone from `GlassSurface` and `GlassMenuContent`, and `GlassMorph` is no longer exported.
43
+ - `GlassTabsIndicator` is the resting plate (Regular by default), and `GlassTabsList` defaults to `interactive={false}`.
44
+ - `/core` no longer exports `materials`, `smoothUnion`, `smoothMin`, `roundRectDistance`, `RoundRect` or `springs.morph`. Use `glassRecipe(options)` for a material's values.
45
+ - `/dom` no longer exports `attachGeometryMotion`, `radiusPixels`, `GeometryAnimator`, `GeometryMotionOptions`, `LensFrame`, `LensPlacement` or `LensWaypoint`. `MaterialMaps.overlay` is replaced by `rim` and `light`, and `attachSelectionLens` takes its lens through the returned `setLens`.
46
+ - `.lg-switch-thumb` styling and `--lg-switch-travel` are no longer needed; size the switch itself.
47
+ - Surfaces get an inline `border-radius` in every browser instead of a `clip-path`, so content inside glass is clipped to rounded corners rather than continuous ones.
156
48
 
157
49
  ## 0.0.2: Faster glass in every engine, and a smaller download
158
50
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Liquid Glass
2
2
 
3
- Glass surfaces and controls for React, the web, and Electron. Clear and Regular materials support light and dark appearances and refract live content.
3
+ Glass surfaces and controls for React, the web, and Electron, modeled on macOS 27. Regular, Clear and Lens materials refract live content in light and dark appearances.
4
4
 
5
5
  [Examples and component reference](https://liquid-glass.glassapp.dev/#examples) · [GitHub](https://github.com/Glass-HQ/liquid-glass)
6
6
 
@@ -18,7 +18,7 @@ import "@glass-sdk/liquid-glass/styles.css";
18
18
 
19
19
  export function Example() {
20
20
  return (
21
- <GlassScene material="regular" appearance="light" style={{ height: 320 }}>
21
+ <GlassScene appearance="light" style={{ height: 320 }}>
22
22
  <GlassContent>
23
23
  <img
24
24
  src="/landscape.jpg"
@@ -27,81 +27,61 @@ export function Example() {
27
27
  />
28
28
  </GlassContent>
29
29
  <GlassSurface radius={28} style={{ position: "absolute", left: 24, top: 100, padding: 20 }}>
30
- <GlassButton onClick={() => console.log("Saved")}>Save</GlassButton>
30
+ <GlassButton onClick={save}>Save</GlassButton>
31
31
  </GlassSurface>
32
32
  </GlassScene>
33
33
  );
34
34
  }
35
35
  ```
36
36
 
37
- Import the stylesheet once. It requires neither Tailwind nor a CSS reset. Put glass components inside `GlassScene`, with one `GlassContent` layer for the background. Text, SVG, and images in that layer stay live. In Next.js, use a client component.
38
-
39
- `GlassContent` keeps your props, ref, and children on its source element inside stable transparent wrappers. Target its class rather than relying on it being a direct child of the scene. Put opacity and clipping intended for the finished composition on `GlassScene` or a shared ancestor; `GlassContent` styles describe the input behind the glass.
37
+ Import the stylesheet once; it needs no Tailwind or CSS reset. Put glass inside a `GlassScene` with one `GlassContent` layer for what the glass refracts. Text, SVG and images in that layer stay live. In Next.js, use a client component.
40
38
 
41
39
  ## Components
42
40
 
43
- | Component | Purpose |
44
- | --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
45
- | `GlassScene`, `GlassContent` | Scene and live background layer. |
46
- | `GlassSurface`, `GlassButton` | Glass container and button. |
47
- | `GlassToolbar`, `GlassToolbarButton`, `GlassToolbarLink`, `GlassToolbarGroup`, `GlassToolbarSpacer` | Keyboard-navigable toolbar. |
48
- | `GlassTabs` | Tab bar with a moving selection indicator. |
49
- | `GlassTabsRoot`, `GlassTabsList`, `GlassTabsTrigger`, `GlassTabsIndicator`, `GlassTabsContent` | Composable tabs and panels. |
50
- | `GlassMenu`, `GlassMenuTrigger`, `GlassMenuContent`, `GlassMenuItem` | Menu with positioning and focus restoration. |
51
- | `GlassMenuSubmenu`, `GlassMenuSubmenuTrigger`, `GlassMenuSubmenuContent` | Nested menus. |
52
- | `GlassSlider`, `GlassSwitch` | Slider and switch. |
53
- | `GlassColorPicker` | Color wheel with a glass bubble that picks colors. |
54
- | `GlassForeground`, `useGlassForeground` | Foreground content that higher glass surfaces can refract. |
55
- | `GlassShape`, `GlassShapeContainer`, `GlassCorner` | Continuous corners and container-relative geometry. |
56
- | `GlassProgressiveBlur`, `GlassScrollEdges` | Progressive blur over background content and scroll edges. |
57
-
58
- Buttons, toolbars, tabs, menus, sliders, and switches use Base UI behavior. Standard props, refs, accessible names, and state callbacks remain available. See the [component examples](https://liquid-glass.glassapp.dev/#examples) for usage and the [Base UI reference](https://base-ui.com/react/overview/quick-start) for inherited props.
59
-
60
- ## Material and motion
61
-
62
- Set defaults on `GlassScene`; individual surfaces can override them.
63
-
64
- The materials follow macOS's own glass in an active window, taken from the filter values Core Animation gives `NSGlassEffectView` on macOS 27 and checked against captures in both appearances. Like macOS's, glass changes with its size: every value follows the shorter side of the shape. Glass up to 64px, such as buttons and capsules, stays nearly clear and bends its rim by half its height; from there to 160px it gathers frost, a darker face in dark appearance and a soft shadow, as panels and menus have. **Clear** keeps what is behind it sharp, lifts it a little, and bends it hard at the rim. **Regular** reads what is behind it nearly sharp and blends in a softer copy, keeping the darker of the two in dark appearance and the lighter in light, then compresses bright backdrops in dark appearance and lifts dark ones in light. The rim is lit as on macOS: a key light from above and a fill light from below add to the glass along its top and bottom edges, strongest on the outermost half pixel and fading over a few pixels and about 45 degrees around the shape, and a fine outline darkens what is behind the glass by its outermost pixel, most where the edge faces sideways. Regular glass also shades its face faintly along a ring a few pixels in. **Lens** is a clear magnifier with colored fringes where it bends, as a control's thumb lifts into under a press: it passes the pixels under it unchanged. `frost` moves Regular and Clear toward opaque, like the Liquid Glass slider in macOS's Appearance settings. Glass that floats above the window, a menu or popover, casts a deeper shadow; set `floating` on any other surface that does. macOS draws its menus Regular: Clear glass keeps what is behind it sharp, so a Clear menu over text or other glass is hard to read.
65
-
66
- | Prop | Default | Usage |
67
- | ------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
68
- | `material` | `"regular"` | `"regular"`, `"clear"` or `"lens"`. |
69
- | `appearance` | `"light"` | `"light"` or `"dark"`. |
70
- | `radius` | Component-specific | Continuous corner radius in CSS pixels, `"capsule"`, or `"circle"`. Generic surfaces default to 8px. |
71
- | `refraction` | By size | Nonnegative displacement in CSS pixels. By default half the shorter side, up to 60 (Clear: 0.65 of it; Lens: a quarter). Nested surfaces limit their default to the parent inset. |
72
- | `tint` | None | Six-digit hex color. Colors the glass without changing text or icons. |
73
- | `interactive` | Component-specific | Press feedback as on macOS: the glass grows 2.5px wider under a press, keeping its proportions, a soft light gathers under the pointer, and it settles back on release; a drag neither moves nor stretches it. On by default for buttons, toolbars, and tab bars. While pressed, links and images inside stop starting a native browser drag; mark content `draggable="true"` to keep it. |
74
- | `specular` | `false` | Two equal rim highlights on opposite corners that turn toward the pointer, and with the device's tilt on Android. Reduced motion holds them at the top left and bottom right. |
75
- | `frost` | `0` | From 0 (most see-through) to 1 (most frosted): more blur, and Regular darkens (dark appearance) or lightens (light) toward opaque. Clear changes only past 0.5, as on macOS. Lens ignores it. |
76
- | `motion` | `"full"` | `"full"`, `"reduced"`, or `"none"`; inherited from the scene. |
77
-
78
- Pressed thumbs lift into Lens glass as macOS's do: a switch's grows to about 1.55 times its size and a slider's to 1.25, over 210ms, and while dragged the lens stretches up to 2.5% along its path and wobbles once when it stops. Their `tint` sets the track color; without one, the `--lg-accent` custom property does, so a stylesheet or a theme variable can color them (`--lg-accent: var(--accent)`).
79
-
80
- Glass takes its look from what is behind it, so over transparent content, such as a control in a small scene of its own, Regular and Clear glass would show only their rims. Set `--lg-backdrop` to the color behind the scene, and glass treats that color as its backdrop wherever the content is transparent: its frost, tone, and refraction look as they would over content of that color. Set it on the scene or any ancestor, with a stylesheet or a theme variable:
81
-
82
- ```css
83
- .toolbar {
84
- --lg-backdrop: var(--window-background);
85
- }
86
- ```
41
+ | Component | Purpose |
42
+ | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
43
+ | `GlassScene`, `GlassContent` | A scene and the live content its glass refracts. |
44
+ | `GlassSurface`, `GlassPopupSurface`, `GlassButton` | Glass, glass for dialogs and popovers, and a button. |
45
+ | `GlassToolbar`, `GlassToolbarButton`, `GlassToolbarLink`, `GlassToolbarGroup`, `GlassToolbarSpacer` | A keyboard-navigable toolbar. |
46
+ | `GlassTabs`, or `GlassTabsRoot`, `GlassTabsList`, `GlassTabsTrigger`, `GlassTabsIndicator`, `GlassTabsContent` | A tab bar, or composable tabs and panels. |
47
+ | `GlassMenu`, `GlassMenuTrigger`, `GlassMenuContent`, `GlassMenuItem`, `GlassMenuSubmenu…` | Menus and submenus. |
48
+ | `GlassSlider`, `GlassSwitch`, `GlassColorPicker` | A slider, a switch and a color wheel. |
49
+ | `GlassRow` | A row that follows the corners of its glass panel. |
50
+ | `GlassShape`, `GlassShapeContainer`, `GlassCorner` | Continuous corners and concentric shapes. |
51
+ | `GlassForeground`, `useGlassForeground` | DOM above the content that higher glass also refracts. |
52
+ | `GlassProgressiveBlur`, `GlassScrollEdges` | Blur that fades in at an edge, and at a scroller's edges. |
87
53
 
88
- The color paints only through the glass; the content and the space around the glass stay transparent. A new color applies without rebuilding the filter. Unset or transparent, it changes nothing.
54
+ Controls are built on [Base UI](https://base-ui.com/react/overview/quick-start), so its props, refs, accessible names and callbacks work as usual. Use `render` to put glass on your own component; it must forward props and ref to its element.
89
55
 
90
- System reduced-motion preferences always apply, including with `motion="full"`. Reduced motion removes stretching and travel; `"none"` removes transitions. Safari uses the same motion settings as other browsers.
56
+ ## Options
91
57
 
92
- Override styles with `className`, inline styles, or CSS utilities. The stylesheet uses low-specificity `:where()` selectors. Use `radius` to change corners so the material and content clip agree. Override `--lg-foreground` for text and icon colors.
58
+ Set these on `GlassScene` to apply to everything in it, or on any surface or control.
93
59
 
94
- ## Composing controls
60
+ | Prop | Default | Usage |
61
+ | ------------- | ---------- | -------------------------------------------------------------------------------------------- |
62
+ | `material` | `regular` | `regular` frosts, `clear` stays sharp, `lens` magnifies with color fringes. |
63
+ | `appearance` | `light` | `light` or `dark`. |
64
+ | `radius` | By control | Corner radius in pixels, `"capsule"` or `"circle"`. |
65
+ | `refraction` | By size | How far the rim bends what is behind it, in pixels. |
66
+ | `tint` | None | Any CSS color, including a theme variable such as `var(--accent)`. |
67
+ | `frost` | `0` | From 0 (see-through) to 1 (frosted). Lens ignores it. |
68
+ | `interactive` | By control | Grow slightly and light up under a press. On for buttons, toolbars and switches. |
69
+ | `floating` | `false` | A deeper shadow, for glass above the window. Menus, popovers and `GlassPopupSurface` set it. |
70
+ | `specular` | `false` | Rim highlights that turn toward the pointer. |
71
+ | `motion` | `full` | `full`, `reduced` or `none`. The system's reduced-motion setting always applies. |
95
72
 
96
- The `render` prop merges props, handlers, styles, and refs with your component. Custom components must forward them to their DOM element. Use transparent backgrounds to keep the glass visible.
73
+ Like macOS's, glass changes with its size: controls up to 64px stay nearly clear, and from there to 160px glass gathers the frost and shadow of a panel.
97
74
 
98
- ```tsx
99
- <GlassSurface material="clear" render={<Button onClick={save} />}>
100
- Save
101
- </GlassSurface>
102
- ```
75
+ CSS custom properties:
76
+
77
+ - `--lg-backdrop`: the color behind the scene. Glass over transparent content looks as it would over that color instead of showing only its rim.
78
+ - `--lg-accent`: a slider's fill and a switch's on track, when no `tint` is set.
79
+ - `--lg-foreground`: text and icon color on glass.
80
+ - `--lg-tab-selection`: the fill of the tab bar's resting selection.
81
+
82
+ Styles use low-specificity `:where()` selectors, so `className`, inline styles and utility classes override them. Change corners with `radius` rather than CSS, so the glass and its content agree.
103
83
 
104
- Menus open and close without animation. Menus stay inside their scene. Content accepts `side`, `align`, `sideOffset`, `alignOffset`, and `collisionAvoidance`; defaults are bottom/end with an 8px offset. Use `positionerProps` and `portalProps` for additional Base UI options.
84
+ ## Examples
105
85
 
106
86
  ```tsx
107
87
  <GlassMenu>
@@ -116,135 +96,29 @@ Menus open and close without animation. Menus stay inside their scene. Content a
116
96
  </GlassMenuSubmenu>
117
97
  </GlassMenuContent>
118
98
  </GlassMenu>
119
- ```
120
-
121
- `GlassMenuGroup`, `GlassMenuGroupLabel`, `GlassMenuSeparator`, `GlassMenuCheckboxItem`, `GlassMenuRadioGroup`, and `GlassMenuRadioItem` expose the corresponding Base UI parts.
122
-
123
- In a toolbar, compose the trigger with `GlassToolbarButton render={<GlassMenuTrigger />}`. Use toolbar buttons and links for arrow-key navigation. `GlassToolbarSpacer` separates glass groups: `sizing="fixed"` gives an 8px gap; `"flexible"` fills available space. Give the toolbar a width or height for flexible spacing.
124
99
 
125
- ## Tabs, sliders, and switches
126
-
127
- ```tsx
128
- <GlassTabs aria-label="Navigation" defaultValue="home"
100
+ <GlassTabs aria-label="View" defaultValue="home"
129
101
  items={[{ value: "home", label: "Home" }, { value: "library", label: "Library" }]} />
130
102
 
131
- <GlassSlider aria-label="Volume" defaultValue={50}
132
- onValueCommitted={(value) => console.log(value)} />
133
- <GlassSlider ticks aria-label="Intensity" min={0} max={100} step={25} />
134
- <label>Notifications <GlassSwitch name="notifications" defaultChecked /></label>
135
- ```
136
-
137
- Tabs select the first enabled item unless `defaultValue` is set. Use `value` and `onValueChange` for controlled selection. For panels or custom triggers, compose the tab parts:
138
-
139
- ```tsx
140
- <GlassTabsRoot defaultValue="preview">
141
- <GlassTabsList aria-label="View">
142
- <GlassTabsIndicator />
143
- <GlassTabsTrigger value="preview">Preview</GlassTabsTrigger>
144
- <GlassTabsTrigger value="usage">Usage</GlassTabsTrigger>
145
- </GlassTabsList>
146
- <GlassTabsContent value="preview">Your preview</GlassTabsContent>
147
- <GlassTabsContent value="usage">Your usage code</GlassTabsContent>
148
- </GlassTabsRoot>
149
- ```
150
-
151
- The list also works within an existing Base UI tabs root; do not nest another root. Keep interactive elements out of tab labels.
152
-
153
- The selection moves as macOS 27's tabs do. At rest the chosen tab sits on a small plate of glass (`GlassTabsIndicator`, Regular by default; `--lg-tab-selection` sets its fill). A press lifts a Lens out of it, a third of the tab's height wider at each end and taller above and below, which magnifies the labels under it while the plate fades. Pressing another tab carries the lens there as it lifts. Dragging moves the lens with the pointer at the size it lifted at, squashing with speed and wobbling as it stops; only at either end of the bar does it take on that tab's size. Letting go settles it onto the tab under its centre, at that tab's size. The lens is a glass surface only while it shows: it is added to the scene's root, beside the bar, so the bar's shape never clips it. The bar itself holds still under a press; set `interactive` on `GlassTabsList` to have it grow.
154
-
155
- Sliders accept a numeric `value` or `defaultValue`, `min`, `max`, `step`, `onValueChange`, and `onValueCommitted`. Defaults are 0–100 with a 0.1 step. With `ticks`, the step must divide the range evenly, with at most 100 intervals. `thumbProps` exposes input refs and accessible value text. `disabled` dims the slider and stops pointer and keyboard changes.
156
-
157
- Switches accept Base UI switch props, including `checked`, `defaultChecked`, `onCheckedChange`, `name`, `inputRef`, `readOnly`, and `disabled`. A disabled switch is dimmed, ignores pointer, drag and keyboard input, leaves the tab order, and is announced as disabled.
158
-
159
- A switch is 54 × 24 pixels by default. To resize it, set only its own `width` and `height` (with a class, inline style, or atomic CSS): the thumb fills the height inside the 2px padding at a 32:20 ratio and travels the width that remains, in either text direction. A macOS-sized switch is `width: 44px; height: 20px`, with a 25.6 × 16 thumb. Name inputs with a label or `aria-label`. Both controls support forms, RTL, `tint`, and reduced motion.
160
-
161
- ## Color picker
162
-
163
- `GlassColorPicker` is a hue and saturation wheel. A small dot of the chosen color marks it exactly, and pressing the wheel grows the dot into a Lens glass bubble that follows the pointer, with a point at its center on the exact color. It renders its own scene, so it does not need a `GlassScene` around it.
164
-
165
- ```tsx
166
- const [color, setColor] = useState("#0a84ff");
167
-
168
- <GlassColorPicker value={color} onValueChange={setColor} name="color" />;
103
+ <GlassSlider aria-label="Volume" defaultValue={50} />
104
+ <GlassSwitch aria-label="Wi-Fi" style={{ width: 44, height: 20 }} />
105
+ <GlassColorPicker value={color} onValueChange={setColor} />
169
106
  ```
170
107
 
171
- Values are six-digit hex colors, picked at full brightness. `onValueCommitted` fires when a drag or key press ends. Arrow keys change hue (left and right) and saturation (up and down); Shift takes larger steps. `size` sets the wheel diameter (default 240). The lens is always Lens glass, with no frost, so the color under it shows as it is; it defaults to `refraction={16}` and `specular`. Set [`--lg-backdrop`](#material-and-motion) to the color behind the picker: the lens refracts it at the wheel's edge.
172
-
173
- ## Progressive blur
174
-
175
- `GlassProgressiveBlur` softens `GlassContent` at an edge. Put captions and controls outside that content layer to keep them sharp.
176
-
177
- ```tsx
178
- <GlassScene style={{ height: 320, overflow: "hidden" }}>
179
- <GlassContent>
180
- <img
181
- src="/landscape.jpg"
182
- alt="Mountain lake"
183
- style={{ width: "100%", height: "100%", objectFit: "cover" }}
184
- />
185
- </GlassContent>
186
- <GlassProgressiveBlur edge="bottom" size={80} blur={20} />
187
- </GlassScene>
188
- ```
189
-
190
- For scrolling content, use `GlassContent layout="scroll"` as the viewport and pass its ref to `GlassScrollEdges`. This keeps the glass and blur stationary during Safari scrolling. Give the scene a bounded height, and place floating controls beside the content:
108
+ Menus also have groups, separators, checkbox and radio items. A switch sizes its thumb from its own `width` and `height`. For a scrolling list with blurred edges, make the content the scroller and pass its ref:
191
109
 
192
110
  ```tsx
193
111
  const viewport = useRef<HTMLDivElement>(null);
194
112
 
195
- <GlassScene style={{ height: 320, overflow: "hidden" }}>
196
- <GlassContent
197
- layout="scroll"
198
- ref={viewport}
199
- tabIndex={0}
200
- role="region"
201
- aria-label="Reading list"
202
- style={{ scrollPaddingBlock: 80 }}
203
- >
113
+ <GlassScene style={{ height: 320 }}>
114
+ <GlassContent layout="scroll" ref={viewport}>
204
115
  {children}
205
116
  </GlassContent>
206
117
  <GlassScrollEdges target={viewport} size={80} blur={20} />
207
118
  </GlassScene>;
208
119
  ```
209
120
 
210
- | Prop | Default | Usage |
211
- | ------------ | ------------------------- | ---------------------------------------------------------------------- |
212
- | `edge` | `"bottom"` | Primitive edge: `top`, `bottom`, `inline-start`, or `inline-end`. |
213
- | `edges` | `["top", "bottom"]` | Scroll helper edges. Logical edges follow direction. |
214
- | `target` | Required on scroll helper | Ref to the scrolling viewport. |
215
- | `size` | `80` | Edge depth in pixels, 0–4096; scroll edges clamp to half the viewport. |
216
- | `blur` | `20` | Gaussian standard deviation in pixels, 0–64. |
217
- | `refraction` | `0` | Optical displacement in pixels, 0–32. |
218
- | `disabled` | `false` | Remove the effect. |
219
-
220
- The viewport needs an explicit height and scrolling overflow. Keep fixed headers and controls outside it, and use scroll padding so focused content can enter the clear area. Blur clears at reached edges and when there is no overflow. Reduced transparency and forced colors disable the effect. If map preparation fails, content remains readable and `onDiagnostic` reports the error.
221
-
222
- ## Content shapes and foregrounds
223
-
224
- `GlassShape` clips images and content to continuous corners without needing a scene:
225
-
226
- ```tsx
227
- <GlassShape radius={28} render={<img src="/cover.jpg" alt="Album cover" />} />
228
- <GlassShape radius={40} style={{ padding: 4 }}>
229
- <GlassShape concentric={{ inset: 4 }} radius={8}>Nested content</GlassShape>
230
- </GlassShape>
231
- ```
232
-
233
- `concentric` follows the nearest declared container's outline. `GlassSurface` supports it too. Use `GlassShapeContainer` to declare geometry without clipping; `GlassCorner` positions a control near a curved corner. Both concentric shapes and corner controls accept `container={containerRef}` for siblings or portals. The container must be measurable; rotation is unsupported. Keep popups outside clipped content.
234
-
235
- Use `GlassForeground` for ordinary DOM above the background that should refract beneath a higher glass surface. For an existing element ref, use `useGlassForeground()`. Keep overlapping content and menus in the same scene.
236
-
237
- `GlassRow` makes any element a row of the glass panel it sits in, like a menu's items: rows in the panel's corners follow its curve moved inward, and their side padding clears it.
238
-
239
- ```tsx
240
- <GlassSurface radius={28} className="my-list">
241
- {options.map((option) => (
242
- <GlassRow key={option.id} render={<button type="button" />}>
243
- {option.label}
244
- </GlassRow>
245
- ))}
246
- </GlassSurface>
247
- ```
121
+ The [examples site](https://liquid-glass.glassapp.dev/#examples) shows every component with its code and full props.
248
122
 
249
123
  ## Without React
250
124
 
@@ -255,7 +129,6 @@ import "@glass-sdk/liquid-glass/styles.css";
255
129
  const scene = createGlassScene(document.querySelector<HTMLElement>(".lg-scene")!);
256
130
  scene.setContent(document.querySelector<HTMLElement>(".lg-content")!);
257
131
  const remove = scene.addSurface(document.querySelector<HTMLElement>(".lg-surface")!, {
258
- material: "regular",
259
132
  radius: 28,
260
133
  });
261
134
 
@@ -264,30 +137,17 @@ remove();
264
137
  scene.dispose();
265
138
  ```
266
139
 
267
- Use the positioned scene/content/surface structure from the React example. `scene.addForeground(element)` registers foreground content and returns a cleanup function. `scene.addAnimator(animator)` updates custom animation before scene measurements.
268
-
269
- In Chromium and Electron, each surface draws its own glass as an inline `backdrop-filter` on the surface, so a change anywhere redraws only the glass over it, and glass over other glass sees that glass as it is. The surface gets inline `border-radius` and `box-shadow` (its shadow), and `clip-path: none`; its original inline values come back when it is removed. A surface with glass inside it draws its glass on a `::before` layer beneath its children instead, and gets `isolation: isolate` and a `data-glass-host` attribute, because a backdrop filter on the surface itself would hide the glass behind it from the glass inside. Such a surface should not use `::before` for anything else. An ancestor with `filter`, `opacity` below 1, `mask`, `clip-path` or `backdrop-filter` limits what a backdrop filter sees to that ancestor, so glass inside one shows only what is inside it; fade a glass surface itself rather than a wrapper. Glass well off screen draws nothing until it comes near.
270
-
271
- In Firefox, each surface draws its own glass: the scene adds an `aria-hidden` layer as the surface's last child, beneath its other children, which paints a live `-moz-element()` view of the content and refracts it. The content layer itself is not filtered there. Firefox otherwise repaints a filtered content layer in software on every frame anything on the page animates. If the content element has no `id`, the scene gives it one while it is attached. Surfaces should not rely on `:last-child` styling of their own children.
272
-
273
- In Safari, content that WebKit composites on its own layer, such as video, WebGL and WebGPU canvases, 3D transforms, `will-change`, running transform or opacity animations, nested glass scenes, and positioned elements over any of them, would otherwise cover the glass. While glass is over such a layer, the scene gives the layer its own copy of the glass through an inline `filter`. For `<video>` and `<canvas>` it also inserts `aria-hidden` mirror canvases just before the element and cuts the glass's shape out of the element with an inline `clip-path`. A media element with an authored `clip-path` is hidden with `opacity: 0` instead, while glass is over it. All of these are removed once the glass moves away. An element in glass content with a long-running animation that Safari repaints every frame, such as an animated gradient or `background-position` shimmer, gets `will-change: transform` while it runs, so its repaints do not re-run the glass filter of the whole content. Elements with positioned descendants are left alone, because the new layer would change their stacking. Selectors such as `:first-child` or `+` that match the media's siblings can see the mirror canvases while they are present.
274
-
275
- The `/core`, `/gpu`, and `/dom` exports provide geometry, materials, rendering, and controller APIs for custom integrations. Type declarations describe their options.
276
-
277
- ## Requirements and limitations
278
-
279
- - React 19+ and Base UI (`@base-ui/react`, a peer dependency) for React components; HTTPS or localhost and an available WebGPU adapter to render glass material maps. Progressive blur needs no WebGPU.
280
- - SVG filter performance varies between browser engines. Safari can spend substantially longer filtering large content layers than Chromium, even when material maps are cached. Keep scenes close to the content they need to refract, and test moving glass on the devices you support. Chromium, Firefox, Safari, and Electron are acceptance targets; they do not have identical performance.
281
- - For consistent refraction in Safari, give `GlassContent` an opaque background, or set `--lg-backdrop`. Transparent source pixels can leave the original content visible beneath its refracted image.
282
- - Use bounded scenes with explicit content layers. Arbitrary page-backdrop sampling, rotated/transformed ancestors, and native ports are outside the supported scope.
283
- - In Safari, glass over a rotated or skewed composited layer, such as an element in a rotating CSS animation, draws beneath it. Encrypted (DRM) video cannot be drawn by any page, so glass over it also draws beneath it. Cross-origin video and canvas content refract without CORS, because the mirror never reads its pixels back.
284
- - `GlassScene.maxSurfaces` defaults to 16 and accepts at most 64. Use `onDiagnostic` for map readiness, construction timing, filter graph limits, and GPU errors.
285
- - NodeNext TypeScript consumers currently need `skipLibCheck: true` for upstream vgpu declarations.
140
+ `/core`, `/gpu` and `/dom` expose the geometry, materials, map rendering and scene controller for custom integrations.
286
141
 
287
- ## How it works
142
+ ## Requirements
288
143
 
289
- vgpu renders WGSL material maps; SVG filters apply them to live DOM content: in Chromium as each surface's backdrop filter, elsewhere as a filter on the scene's content layer. Chromium copies a backdrop filter's images into every frame it draws, so there each map is cut into its four corners and the single column and row between them, which the filter stretches along the straight edges. Maps are cached and reused as surfaces move. Geometry changes prepare new maps. The library does not capture DOM screenshots. A `--lg-backdrop` color is composited beneath the content only in the area each surface samples, before frost and refraction; in Firefox it is the background color of each surface's glass layer.
144
+ - React 19 or later and `@base-ui/react` for the components.
145
+ - HTTPS or localhost and a WebGPU adapter. Blur needs no WebGPU.
146
+ - Chromium and Electron are fastest. Firefox and Safari are supported. Safari can be slow with large scenes, so keep scenes close to the content they refract.
147
+ - Glass refracts its scene's content layer, not the rest of the page. Rotated or transformed ancestors aren't supported.
148
+ - A scene holds 16 surfaces by default and up to 64 (`maxSurfaces`). `onDiagnostic` reports errors and timing.
149
+ - NodeNext TypeScript projects need `skipLibCheck: true` for vgpu's declarations.
290
150
 
291
- ## Contributing and license
151
+ ## License
292
152
 
293
- See [Contributing](https://github.com/Glass-HQ/liquid-glass/blob/main/CONTRIBUTING.md). Licensed under [MIT](LICENSE).
153
+ [MIT](LICENSE).