On this page:

Button

Colors

Preview

index.tsx

Primary

Neutral

Adverse

Kinds

Preview

index.tsx

Solid

Outline

Ghost

Glass

Sizes

Preview

index.tsx

Others

Preview

index.tsx

Icons

States

Design Tokens for Button

TokenColor forState/Meaning
--par-color-text-button-<kind>-<color>-<state>Button textsolid, outlined, ghost, glass; neutral, accent, adverse; enabled, hovered, pressed, disabled, pending
--par-color-bg-button-<kind>-<color>-<state>Button backgroundsolid, outlined, ghost, glass; neutral, accent, adverse; enabled, hovered, pressed, disabled, pending
--par-color-border-button-<kind>-<color>-<state>Button bordersolid, outlined, ghost, glass; neutral, accent, adverse; enabled, hovered, pressed, disabled, pending

Note: Replace kind with solid, outlined, ghost, glass; color with neutral, accent, adverse; state with enabled, hovered, pressed, disabled, pending as appropriate.

Button API Reference

<Button />

PropTypeDefaultDescription
size'sm' | 'md' | 'lg''md'Button size.
color'neutral' | 'accent' | 'adverse''neutral'Button color.
kind'solid' | 'outlined' | 'ghost' | 'glass''solid'Button visual style.
isPendingbooleanfalseShow loading spinner and disable interaction.
iconOnlybooleanfalseIcon-only button (no text).
disabledbooleanfalseDisable the button.
...buttonPropsHTMLButtonElement propsAll native button props (className, style, etc.)

Note: Button extends all native props from HTMLButtonElement. See MDN: button element for more details.