Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Button

A native <button> with Glaceon’s control tokens applied. No state machine: a button’s behaviour is the browser’s, so this is a CSS-only primitive with full attribute passthrough.

React Buttonlive
import { Button } from "@/components/ui/button";
export function Actions() {
return (
<div className="flex gap-2">
<Button>Save Changes</Button>
<Button variant="ghost">Cancel</Button>
<Button variant="warn" size="sm">Delete</Button>
</div>
);
}

Run the Glaceon CLI in your project root to copy the styled wrapper into your components directory:

Terminal window
npx @glaceon/cli add button --framework react # or svelte, solid

CSS-only primitives expose no data-* attributes; their states are the browser’s own pseudo-classes.

State Selector Applied styling
Hover :hover Variant background deepens (hover:bg-green-deep, hover:bg-green-soft, hover:bg-danger-bg).
Focus :focus-visible 2px --action ring with offset. Never removed (outline: none is not used).
Disabled [disabled] cursor-not-allowed and 50% opacity.
Active / loading none Not implemented. A loading state belongs to the consuming feature.
Prop Type Default Description
variant "primary" | "ghost" | "warn" "primary" Solid green fill, green outline only, or destructive red outline.
size "md" | "sm" "md" md is 44px tall (the minimum tap target), sm is 36px for dense desktop toolbars.
type "button" | "submit" | "reset" "button" Native button type. Defaults to button so it never submits a form by accident.
disabled boolean false Native disabled state.
class / className string undefined Extra classes, appended last.

All other native <button> attributes pass through unchanged.

Focus is never removed: every variant takes a 2px --action ring with an offset, so keyboard users always see where they are.

White text on --green (#0F844F) measures 4.74:1, clearing the 4.5:1 needed for 14px bold text. The brand token was darkened from the mockup’s #12925A, which measured 3.97:1 and failed. ghost and warn pass as-is.