Repository navigation
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.