Liquid Glass Button
Layered glass for everyday actions, with selective tint for the primary action.
Liquid Glass Button uses soft edge highlights and background refraction to distinguish controls from content. Use the regular style for secondary actions such as Back, and the prominent tint for the primary action. Both styles keep the same size.
The preview background stays still so you can focus on hover, press and keyboard focus feedback. Click Back to observe its activation count, or use the page runtime selector to compare the same component across four Web adapters.
Install
Section titled “Install”
npx @proto.ui/cli@latest add wc liquid-glass-button
Usually, highlight one primary button in a group and use the regular style for the remaining actions. These examples show regular, prominent and disabled states.
Regular
Section titled “Regular”
<div class="flex flex-wrap items-center gap-6 liquid-functional-demo">
<wc-liquid-glass-button>Back</wc-liquid-glass-button>
</div>
Prominent
Section titled “Prominent”
<div class="flex flex-wrap items-center gap-6 liquid-functional-demo">
<wc-liquid-glass-button variant="prominent">Continue</wc-liquid-glass-button>
</div>
Disabled
Section titled “Disabled”
<div class="flex flex-wrap items-center gap-6 liquid-functional-demo">
<wc-liquid-glass-button disabled>Unavailable</wc-liquid-glass-button>
</div>
Material and accessibility
Section titled “Material and accessibility”The default regular material is intended for readable functional controls. Reserve variant="prominent" for primary actions, and avoid layering glass buttons over glass containers. These choices follow Apple’s Materials, Color and Buttons guidance.
material="auto" enables optics when the host supports them; material="opaque" uses an opaque surface. The Web preview samples its actual visible canvas background. Ordinary DOM backgrounds or intervening content outside that source retain a readable opaque button.
Reduced motion disables elastic deformation while retaining static material. Reduced transparency, increased contrast and forced colors use a readable fallback. Disabled buttons keep their label and outline without accepting activation.
- variant: regular / prominent, default regular
- material: auto / opaque, default auto
- disabled: boolean, default false
- Activation, focus, keyboard and disabled behavior are inherited from Base Button; the visual layer owns no second interaction state.
Liquid Glass remains a WIP / experimental family, and its source package is unreleased. These previews show an independent Web implementation; native rendering, morphing between components and complete Compiler support are still in development.