Button

Triggers an action. Springy press feedback, a loading state that grows in place, and seven variants.

Playground

Tweak the props, the preview and the code follow.

Props
import { ArrowRight } from "lucide-react"
import { Button } from "@/components/ui/button"

<Button>
  Continue
  <ArrowRight />
</Button>

Installation

npx @plumsydev/plum-ui add button

Usage

import { Button } from "@/components/ui/button"
<Button variant="outline">Button</Button>

Examples

Variants

Sizes

Loading

The spinner animates its width so the label never jumps.

As child

Render any element — like a Next.js Link — with button styles.

API Reference

Button

Extends the native button element.

PropTypeDefault
variant

Visual style.

"default" | "brand" | "secondary" | "outline" | "ghost" | "destructive" | "link""default"
size

Height and padding.

"xs" | "sm" | "default" | "lg" | "xl" | "icon" | "icon-sm" | "icon-xs""default"
loading

Shows an inline spinner and sets aria-busy.

booleanfalse
asChild

Merge props onto the child element instead of rendering a button.

booleanfalse

Notes

  • Use buttonVariants() to give any element button styles without the component.