Version: 1.0.0Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
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:| Variant | Use for |
|---|---|
default | Primary CTAs, form submit buttons |
destructive | Delete, reject, and other dangerous actions |
outline | Secondary actions, toolbar buttons |
secondary | Tertiary or muted actions |
ghost | Icon buttons, toolbars, minimal chrome |
link | Inline navigation, text-style links |
success | Approve, complete, positive confirmation |
warning | Caution actions, escalation, review needed |
soft | Subtle emphasis, dashboard quick actions (same semantic as Badge info) |
| Size | Use for |
|---|---|
default | Standard buttons (h-10) |
sm | Compact buttons in toolbars (h-9) |
xs | Very compact: table row actions, inline (h-7) |
lg | Hero CTAs, prominent actions (h-11) |
icon | Icon-only buttons; 44px min touch target (use with aria-label) |
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