---
name: ux-feedback
description: Add appropriate user feedback states (loading, success, error, empty) to a component or page
risk: unknown
source: https://github.com/bitjaru/styleseed/tree/main/engine/.claude/skills/ss-feedback
source_repo: bitjaru/styleseed
source_type: community
date_added: 2026-07-01
license: MIT
license_source: https://github.com/bitjaru/styleseed/blob/main/LICENSE
---
# UX Feedback States Generator
## When to Use
Use this skill when you need add appropriate user feedback states (loading, success, error, empty) to a component or page.
## When NOT to use
- For only the words inside a state → use `/ss-copy`
- For accessibility issues in existing states → use `/ss-a11y`
- For brand-new component creation → use `/ss-component`
- For analytics or error-logging plumbing — UI presentation only
Target: **$ARGUMENTS**
## Instructions
1. Read the target file and identify all data-dependent areas.
2. Read the design language reference:
- `DESIGN-LANGUAGE.md` sections on Loading States (Skeleton), Empty States, Error States
3. For each data-dependent area, implement ALL 4 states:
### State 1: Loading (Skeleton)
```tsx
// Skeleton must match the final layout shape
```
Rules:
- Show skeleton for 300ms minimum (prevent flash)
- Delay skeleton display by 300ms (fast loads skip skeleton entirely)
- Use `animate-pulse` (1.5s cycle)
- Match skeleton shapes to real content dimensions
- Never use spinners inside cards
### State 2: Empty (Zero Data)
```tsx
Create Project}
/>
```
Rules:
- Center-aligned in the card
- Icon: 32px, `text-text-tertiary`
- Title: 14px, `text-text-secondary`
- Always suggest a next action
- Zero values show as "0" (don't hide or dash)
### State 3: Error (Load Failed)
```tsx
Couldn't load the data
```
Rules:
- Partial failure: only affected card shows error, rest loads normally
- Full page failure: full-screen EmptyState with retry
- Error message: plain language, blame the system
- Always provide retry button
### State 4: Success (Action Feedback)
```tsx
// Toast notification for action confirmations
toast("Changes saved")
// With undo for destructive actions
toast("Item deleted", { action: { label: "Undo", onClick: handleUndo } })
```
Rules:
- Info toast: 3s display
- Action toast (with undo): 5s display
- Toast position: above BottomNav
- One toast at a time (new replaces old)
4. Implementation pattern:
```tsx
function DataCard({ data, isLoading, error }) {
if (isLoading) return
if (error) return
if (!data || data.length === 0) return
return
}
```
5. Check `prefers-reduced-motion` — disable `animate-pulse` when reduced motion is preferred.
## Limitations
- Use this skill only when the task clearly matches its upstream source and local project context.
- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
- Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.