Last Updated: 2026-03-13
Scope: All
Button usage from @/shared/ui/button
Import
Use the shared Button component only:@/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 anaria-label so screen readers can announce the action.
aria-hidden="true" on the icon.
Loading State
Use the Buttonloading prop for submit and other async actions so the button shows a spinner and is disabled automatically.
asChild with Link
When usingasChild with Link, the link must provide the accessible name (visible text or aria-label).
Dialog Footer Order
InDialogFooter, place Cancel (or secondary) on the left, primary action on the right.
References
- src/shared/ui/button.tsx — Component and variant/size API
- ICON_GUIDE.md — Icon sizing and accessibility
- UI_UX_STANDARDS.md — Semantic tokens and design system
- .cursor/rules/dialog-size-standards.md — Dialog and sheet sizes