UI Components Standard
Modals, toasts, loading states, skeleton screens, buttons, badges, tooltips, dropdowns, tabs, accordion — all component patterns and rules.
1. Modals & Dialogs
Opening
Closing
Structure
Confirmation Modals
| Risk Level | Title | Body | Button |
|---|---|---|---|
| Low risk (Archive, soft actions) | "Archive Project?" | What happens + whether it is reversible | Action label (amber if reversible, red if not) |
| Medium risk (Delete a record) | "Delete Project?" | "[Name]" specifically + consequence + affected count + "This action cannot be undone." if irreversible | "Delete Project" — red/danger |
| High risk (Delete account, all data) | Same as medium | Same as medium + type-to-confirm input ("Type DELETE to confirm") | Disabled until input matches exactly (case-sensitive) |
Accessibility
2. Notifications & Toasts
Types and Purpose
| Type | Color | When | Duration |
|---|---|---|---|
| Success | Green | Async action completed | 4 seconds |
| Error | Red | Action failed | 6 seconds |
| Warning | Amber | Completed with caveat | 5 seconds |
| Info | Blue | Neutral information | 5 seconds |
Behavior
Content Rules
What Triggers a Toast
| Always Show Toast | Never Show Toast |
|---|---|
| Create → success toast | Page load or data fetch completing |
| Update/save → success toast | Navigation between pages |
| Delete → success toast (+ optional undo) | Opening or closing a modal |
| Send/invite → success toast | Client-side validation failure (use inline field errors) |
| Any async failure → error toast or inline banner | Background auto-save (use a subtle "Saved ✓" indicator, not a toast) |
3. Loading States
Buttons
Standard Loading Labels
| Default | Loading |
|---|---|
| Create / Add | Creating... |
| Save Changes | Saving... |
| Delete | Deleting... |
| Send / Invite | Sending... |
| Upload | Uploading... |
| Export | Exporting... |
| Submit | Submitting... |
Page & Section Loading
4. Skeleton Screens
Shape
Behavior
When to Use
| Use Skeleton | Use Spinner |
|---|---|
| Initial page/section load, tables, card grids, form pre-fill | Button action, small inline refresh, short operations < 300ms |