Components › Actions

Button

A keycap with a real bottom edge. It lifts on hover and sinks when pressed.

Installation

npx plankui@latest add button

Usage

import { Button } from "@/components/ui/button";

<Button>Save</Button>
<Button variant="secondary" size="sm">Cancel</Button>

API reference

PropTypeDefaultDescription
variant"primary" | "secondary" | "soft" | "outline" | "ghost" | "danger" | "link""primary"Visual style.
size"xs" | "sm" | "md" | "lg" | "icon" | "icon-sm""md"Height and padding.
loadingbooleanfalseShows a spinner and blocks clicks.
asChildbooleanfalseRender the child element, such as a router link, with button styles.

View the source on GitHub