Open source
Liquid Glass UI
A React, TypeScript and plain CSS component library with a dark, refractive glass material. MIT licensed, no runtime dependencies.
Install
npm i @ultralabs/glass react@19 react-dom@19Peer range is react and react-dom ^19.0.0. Import the tokens first, then the component styles.
Usage
import '@ultralabs/glass/tokens.css';
import '@ultralabs/glass/dist/ul-glass.css';
import { ULProvider, ULAccentScope, ULButton } from '@ultralabs/glass';
<ULProvider material="glass">
<ULAccentScope accent="violet" strength="tinted">
<ULButton variant="primary" onClick={save}>Save changes</ULButton>
</ULAccentScope>
</ULProvider>Glass needs something to refract. Put the app over a detailed background such as imagery, gradients or type.
Principles
One material
Every component is built on ULGlass. No component sets its own blur, shadow or rim.
Tokens only
Colors, radii, durations, blur and refraction come from --ul-* variables. No literals inside the components.
Glass never samples glass
Nested glass is flattened automatically. Sibling glass goes in ULGlassGroup.
Capsule-first, concentric
Inner radius is the outer radius minus the padding.
Reduced motion respected
Surfaces appear by growing the lens. With reduced motion on, they use a short uniform scale and fade.
Package facts
- License
- MIT
- Version
- 0.1.0
- Package
- @ultralabs/glass
- Source
- ultralabss/liquid-glass
More open-source packages coming
We plan to publish more of our internal building blocks as open source, authentication logic among them. There is no date yet.
Questions about the package, or want to use it in a project?
Start a project- You send a short briefA few sentences are enough. No forms longer than one screen.
- We replyWe reply with a next step.
- First callScope, rough plan and the first weekly milestone.