Button
A glass button that swells and lights up under a press.
Installation#
$ pnpm dlx shadcn@latest add @liquikit/buttonNeeds the @liquikit registry in your components.json. Set it up once.
Usage#
import { Button } from "@/components/liquikit/button"<Button variant="prominent">Continue</Button>Examples#
Sizes#
Icon#
Pass icon for a square button that holds a single icon. Give it an aria-label.
Tint#
tint colours a prominent button with any CSS colour.
API Reference#
Button
| Prop | Type | Default |
|---|---|---|
theme | "light" | "dark"Light or dark glass. Falls back to the nearest | — |
lens | Partial<LensProfile>Overrides for the lens profile, such as | — |
liquid | numberHow far the glass squashes and stretches as it moves. | — |
variant | "glass" | "prominent" | "clear"
| "glass" |
size | "small" | "regular" | "large"Height and padding of the button. | "regular" |
icon | booleanMakes the button square, for a single icon. | false |
block | booleanStretches the button to the width of its container. | false |
tint | stringColour of the glass body. Accepts any CSS colour. | — |
refraction | "interactive" | "always"When the glass bends the page. | "interactive" |
Also takes every prop of Base UI's button, plus className and style.