Button

Button with four variants (solid, soft, outline, ghost), eight semantic colors, icon slots, loading, and block layout.

import { Button } from "@plexui/vue/components/Button";

Examples

Overview

Colors & variants

Sizing & roundness

size
variant
color

Icons

variant
size
gutterSize
iconSize
color

Block

Disabled

Inert

Loading

Selected

variant

Optical alignment

Button shares the unified 9-step size scale with Input, Select, SelectControl, and SegmentedControl.

API

Props mirror the React Button. In Vue, pass classes with class (React's className) and listen with @click.

PropTypeDefaultDescription
color"primary" | "secondary" | "danger" | "success" | "info" | "discovery" | "caution" | "warning""primary"Visual color scheme
variant"solid" | "soft" | "outline" | "ghost""solid"Button style variant
size"3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl""md"Control height and default gutter/icon size
pillbooleanfalseFully rounded corners
blockbooleanfalseFull width
uniformbooleanfalseSquare icon button (width equals height)
disabledbooleanfalseVisually and accessibly disabled; click is not emitted
disabled-tone"relaxed"—Default cursor instead of not-allowed while disabled
loadingbooleanfalseShows loading indicator
inertbooleanloadingAccessibly disabled without visual change
selectedbooleanfalseSelected state styling
optically-align"start" | "end"—Offset gutter for optical alignment
gutter-size"3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl"—Horizontal padding size; defaults from size
icon-size"sm" | "md" | "lg" | "xl" | "2xl"—Size of icons in the slot; defaults from size
type"button" | "submit" | "reset""button"Native button type
@click(event: MouseEvent) => void—Emitted on click, unless disabled

Styling

Button reads these component tokens. Override them at any scope to restyle it:

  • --button-font-weight: font weight (default var(--font-weight-medium))
  • --button-gap-lg: gap lg (default 6px)
  • --button-gap-md: gap md (default 4px)
  • --button-gap-sm: gap sm (default 3px)