website-glass
Components

Glass Button

iOS-style liquid glass button — icon disc or text capsule with a gel press that squeezes and clears the tint while held.

Playground

Edit the props live and copy the config.

Variant
Tint
0.4
<GlassButton variant="capsule" tint={0.4}>
  Continue
</GlassButton>

Install

npx shadcn@latest add https://websiteglass.com/r/glass-button.json

Usage

import { GlassButton } from '@/components/ui/glass-button';

// Icon button
<GlassButton aria-label="Notifications">
  <BellIcon className="size-5" />
</GlassButton>

// Text capsule
<GlassButton variant="capsule">
  Continue
</GlassButton>

Props

PropTypeDefaultDescription
variant"icon" | "capsule""icon"icon = circular disc, capsule = horizontal pill.
tintnumber0.4Frosted glass tint 0–1.
childrenReactNodeIcon or label content.

All native <button> props are forwarded.

Interaction

On pointerdown the button squeezes to 92% scale and the tint clears to expose the frosted surface. On release it eases back to rest with a slight overshoot (the easeGel easing from glass-motion).