Pilipinas Interface

Foundation

  • Overview
  • Get Started
  • Colors
  • Typography
  • Icons
  • Layout & Spacing
  • States & Feedback
  • Motion & Transitions
  • Expressions

Components

  • Overview
  • Accordion
  • Alert
  • Avatar
  • Badge
  • Banner
  • Breadcrumb
  • Button
  • Card
  • Checkbox
  • Code Block
  • Combobox
  • Command Menu
  • Dialog
  • Popover
  • Progress
  • Radio Group
  • Scroll Area
  • Select
  • Skeleton
  • Switch
  • Table
  • Tabs
  • Text Field
  • Tooltip

Resources

  • Registry

Components

Button

One clear action per region. Modifiers cover containment, outline, soft fill, flat, link and alert; utilities cover icons, sizes, shape and state.

Preview

Modifiers

States

With icons

Sizes

<Button variant="primary">Submit application</Button>
<Button variant="outline">Cancel</Button>
<Button variant="secondary" size="compact">Save draft</Button>
<Button variant="link">Learn more</Button>
<Button variant="destructive" loading>Delete</Button>

Usage

The one clear action in a region.

Do and don't

  • Do. Use a specific label and pick one modifier per role; keep one contained action per region.
  • Don't. Put two contained buttons in one section or use active for selection.

Variants

VariantUse
primaryContained. The one affirmative action in a region.
outlineBordered, almost no fill. Secondary actions on any surface.
secondarySoft fill for actions that matter but do not lead.
tertiaryAlias kept for existing code. Use outline in new code.
ghostFlat. Toolbars and row actions.
linkUnderlined text for navigation inside a sentence.
destructiveAlert. Irreversible actions; pair with a confirmation.

Sizes and shape

default is 36px, compact 28px. icon and icon-compact are square. Legacy sm/md/lg aliases still resolve. Corner style comes from the shape preference, so buttons follow the same sharp, rounded or pill hierarchy as every other control.

States

A press compresses the surface by 1px without shifting layout. loading shows the spinner and blocks repeat activation. active holds the pressed look only while a popup is open. Disabled buttons explain why in nearby text rather than relying on the dimmed fill. See States & Feedback.

Props

  • variant; one of the seven styles above.
  • size; default, compact, icon or icon-compact.
  • loading; blocks interaction while work is in flight.
  • leadingIcon / trailingIcon; icon components from the slot map.
  • asChild / render; render the styling on a link or another element.
  • active; forces the pressed look for an open popup. Not for selected state.

Accessibility

Native <button> semantics are preserved, so Enter and Space activate it. Keep labels specific, for example Submit application rather than OK. An icon-only button needs an aria-label. Keep a 24px minimum target on dense surfaces and prefer the default step on touch layouts.

Related

Fills and text colors come from the Colors interaction tokens; labels use the Typography body role.

← PreviousBreadcrumbNext →Card

Install

npx shadcn@latest add @pilipinas/button

For your coding agent