ZAO造

Button

A direct action with clear emphasis and a predictable result.

Anatomy

Measured parts, with contact expanded 18×.

Measuring component parts…

Preview

Su uses the Quiet instrument direction. Use the mode switcher above to see light and dark.

Emphasis

Size

Icon content

Width

Loading

LoadingLoadingLoadingLoadingLoading

Loading demo

This local demo does not save data.

Result

Press an action. The face stays seated while it reads the result, then lifts. This local demo copies and publishes nothing.

Usage

  • Use primary for the main action in a group. Use secondary or quiet for supporting actions, and danger for destructive actions.
  • Name the result of the action in the label, such as “Save changes”.
  • Leading and trailing icons support the visible label. A trailing action icon can indicate a dropdown; use Menu for its actual popup and keyboard behavior.
  • Use block to fill the available width. For asynchronous actions, pass loading={isPending} from the initial render, including false, so the live region exists before its message changes. Keep the label stable; the host controls completion and announces the result.

API

PropValuesDefault
variantprimary | secondary | quiet | dangerprimary
sizesmall | default | largedefault
leadingIconSVG component (Iconoir-compatible)—
trailingIconSVG component (Iconoir-compatible)—
trailingActiondecorative SVG component—
blockbooleanfalse
loadingbooleanfalse
loadingAnnouncementstringLoading
typebutton | submit | resetbutton
disabledbooleanfalse

Example

import { Button } from '@zao/react';
import { Copy } from 'iconoir-react';

<Button leadingIcon={Copy} loading={saving} loadingAnnouncement="Saving draft.">
  Save draft
</Button>

Accessibility

Button uses a native button through Base UI, with keyboard activation and a stationary focus outline. Icons are decorative. Disabled buttons skip the tab order. Loading buttons remain focusable, expose busy and disabled semantics, and block repeat activation while preserving their accessible name and width. A polite status announces loading; reduced motion keeps the spinner still.