Repository navigation
Releases
v1.3.0
Install with npm install @vepando/liquid-glass-react. The engine is unchanged since 1.2.1; this release adds six components modelled on iOS 26 and a rewritten readme.
New components
Install them as source through the shadcn CLI:
npx shadcn@latest add https://leonardseo.github.io/liquid-glass-react/r/glass-switch.jsonGlassSwitch(glass-switch): the iOS 26 switch. Its white capsule lifts into a clear glass lens as it toggles and stays glass while held.GlassSlider(glass-slider): a 6px track whose thumb becomes a lens while dragged and stretches the track past either end. Supportsmin,max,step, keyboard and forms.GlassSegmentedControl(glass-segmented-control): a white pill that rises into a lens you can drag between segments. A radio group with arrow keys.GlassToolbar(glass-toolbar): a group of actions on one shared glass capsule, with arrow key navigation from Base UI.GlassInput(glass-input): a text field on glass with an icon, a trailing slot and a clear button, such as a search field.GlassMenu(glass-menu): a menu that morphs out of its glass button and shrinks back into it.
Shared lens
The switch, slider, segmented control and tab bar now share one glass lens and one spring (glass-lens), which installs automatically. The tab bar's lens gets the same optics: a narrow rim, a clear middle and no colour fringe.
Fixes
- The tab bar and segmented control read the pointer in layout pixels, so the glass lands in the right place inside scaled content.
- Component rules are scoped so a page's own
buttonandinputstyles cannot override them. - The new components style themselves in their own CSS and work without Tailwind.
Docs and demo
- The readme is rewritten as an overview: the two ways to use the library, one table of all components and shorter reference sections.
- The showcase has a settings panel that switches between light, dark and automatic, and a Safari-like scene with a search field, toolbar and menu.
v1.2.1
Install with npm install @vepando/liquid-glass-react. This release covers everything since 1.0.1.
Glass styles
variantpicks the glass:regular(frosted, the default, matched against macOS'sNSGlassEffectView),clear(see-through with a refracting rim) oridentity(no glass).- Glass follows a
darkclass ordata-theme="dark"on the element or an ancestor.
Changed default: <LiquidGlass> now looks like regular. The earlier look is still available through variant="lens".
Components
Button, Tabs, Tab Bar, Dialog and Card install as source through the shadcn CLI:
npx shadcn@latest add https://leonardseo.github.io/liquid-glass-react/r/glass-button.json- New
GlassTabBar: a quiet pill at rest and a magnifying lens you can drag between items, as tabs or as a navigation. - Materials:
regular,clearandbar.
Engine
useLiquidGlassgives you the engine without thediv, for Base UI, Radix or your own markup.LiquidGlassforwardsrefand takes arenderprop for other elements.radius="auto"reads the CSS border radius, and stylesheet tokens are picked up on theme changes.- Styles for
prefers-reduced-transparency,prefers-contrastandforced-colors.
Fixes
- A forwarded ref no longer disables refraction under React 19.
- The stylesheet no longer loses
backdrop-filterto CSS minifiers. GlassCardandGlassDialogkeep your own pointer handlers and style.- Dark and high-contrast styles now also apply in the frosted Safari and Firefox fallback.
Demo
The live demo has a new overview, a glass lab and a showcase.