Button - National Design System

Interactive controls for actions, navigation, and form submissions

Standard

Six variants across all interaction states

Destructive

Red-toned variants for delete, remove, and irreversible actions

Layout

Content visibility, icon position, shape, and state modifiers

Menu Button

Dropdown trigger with auto-rotating indicator

Button Group

Grouped buttons with merged borders and shared border radius

Animated Progress

Circular countdown timer controlled by --progress-duration

Static Progress

Fixed percentage indicator controlled by --progress-value

Status Feedback

Contextual color and icon change via data-status attribute

Badge

Notification count overlay on icon buttons

Built-in Features

Pure CSS

No JavaScript required. All variants, sizes, and states render from HTML markup with design tokens.

Six Variants

Primary, neutral, secondary, secondary-outline, subtle, and transparent with full state coverage.

Three Sizes

24px to 40px. Font, icon, and indicator scale proportionally.

Layout Options

Lead icon, trail icon, icon-only, label-only, circular, full-width, and loading state.

Accessibility

High contrast borders, reduced motion fallback, print styles, and focus-visible ring.

Composable

Combine with destructive, on-color, loading, progress, status, badge, indicator, and groups.

Usage Guidelines

When to Use

  • Use primary for the main action on the page. Limit to one per view
  • Use neutral for strong secondary actions that need visual weight
  • Use secondary/outline for supporting actions alongside a primary button
  • Use subtle/transparent for low-emphasis actions like cancel, dismiss, or tertiary options
  • Use destructive for delete, remove, or irreversible actions. Pair with a confirmation dialog
  • Use on-color variants when placing buttons on colored or dark backgrounds
  • Use icon-only for toolbar actions where space is limited. Always include aria-label
  • Use loading state after a click to indicate processing. Disable the button to prevent double submissions
Was this page useful?
60% of users said Yes from 2843 Feedbacks