Skip to main content
Version: 1.0.0
Last Updated: 2026-03-13
Scope: All Button usage from @/shared/ui/button

Import

Use the shared Button component only:
Do not use legacy paths (e.g. @/components/ui/button).

Variants and Sizes

Authority: Variant and size API and usage guidance are defined in src/shared/ui/button.tsx. Summary: Semantic consistency: Use destructive for delete/reject actions, success for approve/complete actions, and warning for caution. Prefer the loading prop for async submit actions (see Loading State).

Icon-Only Buttons (Accessibility)

Icon-only buttons must have an aria-label so screen readers can announce the action.
When the icon is decorative (button has visible text), use aria-hidden="true" on the icon.

Loading State

Use the Button loading prop for submit and other async actions so the button shows a spinner and is disabled automatically.

When using asChild with Link, the link must provide the accessible name (visible text or aria-label).

In DialogFooter, place Cancel (or secondary) on the left, primary action on the right.

References