Button

Ward's pill-shaped button with the shadcn/ui API: default, secondary, outline, ghost, destructive and link variants, icon sizes and asChild.

Installation

pnpm dlx shadcn@latest add @ward/button

Add the Ward registry to components.json once:

"registries": {
  "@ward": "https://ward.so/r/{name}.json"
}

Or install from the URL with no configuration: npx shadcn@latest add https://ward.so/r/button.json

Usage

import { Button } from "@/components/ui/button";
<Button>Save</Button>
<Button variant="outline" size="sm">Cancel</Button>

Props

PropTypeDefaultDescription
variant"default" | "secondary" | "outline" | "ghost" | "destructive" | "link""default"Visual style.
size"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg""default"Height and padding; icon sizes are square.
asChildbooleanfalseRender the child element (for example a link) with button styles.

Ward · Version 2.0.0 · Registry manifest