Specimens

Eleven live demos, every control.

Press, drag, and slide them. The snippet under the stage is the code that produced it. Switch the framework and the same control is written again.

Edit Done

Button

Capsule, circle, or rounded. Glass by default, tinted with the accent when prominent, or plain inside a group. A press swells and lights up under the finger.

<glass-button shape="circle" aria-label="Back"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg></glass-button>
<glass-button>Edit</glass-button>
<glass-button variant="prominent">Done</glass-button>

Svelte samples here are Svelte 5. Svelte 4 uses the same components with let and on:click. The use:useGlass action works in both versions. See examples/svelte/src/Svelte4.svelte.

Vue named slots use <template #name>. #trigger on GlassMenu, #icon and #trailing on GlassButton, and #icon and #shortcut on GlassMenuItem. The wrapper stamps those onto the custom element. HTML, React, and Svelte keep slot="trigger".

Attributes and events
AttributeTypeDefaultNotes
variantstringglassglass, prominent (tinted with --glass-accent), or plain.
sizestringmediumsmall, medium, large: 32, 44, or 52 px tall.
shapestringcapsulecapsule, circle for icons, or rounded.
typestringbuttonsubmit and reset work inside forms.
hrefURLnoneRenders as a link.
disabledbooleanfalse
EventDetails
clickNative click, also from Enter and Space.