Browse docsButton

Controls

Glass Button

A glass button with four variants, three sizes and an asChild mode for links.

Preview

Demos ready. Update 0.

Installation

For React 19+ apps with Tailwind CSS 4.

npx shadcn@4.14.1 add @glassyui/glass-button

Adds 10 files to components/glassyui and installs @radix-ui/react-slot and clsx.

Usage

Usage

import { GlassButton } from "@/components/glassyui/glass-button";

export function ButtonDemo() {
  return <GlassButton>Save changes</GlassButton>;
}

Examples

Variants

<div className="flex gap-3">
  <GlassButton variant="prominent">Prominent</GlassButton>
  <GlassButton variant="primary">Primary</GlassButton>
  <GlassButton variant="soft">Soft</GlassButton>
  <GlassButton variant="ghost">Ghost</GlassButton>
</div>
As a link

<GlassButton asChild variant="prominent">
  <a href="/pricing">See pricing</a>
</GlassButton>

API reference

GlassButton

PropTypeDefaultDescription
variant'primary' | 'prominent' | 'soft' | 'ghost''primary'Visual style. prominent is blue glass for the main action; ghost has no glass.
size'sm' | 'md' | 'lg''md'Control size.
asChildbooleanfalseRenders the single child, such as a link, with the button's material. disabled has no effect then.
type'button' | 'submit' | 'reset''button'Native button type. Set 'submit' to submit a form.
preset'control' | 'showcase''control'Material preset; showcase allows a stronger backdrop blur.
lensbooleantrue except ghostChromium-only rim lens that bends the page behind it. Off while disabled or with reduced transparency.

Also accepts HTML button attributes.

Types
ButtonPropsButtonVariantButtonSize