ux-states
Installation
SKILL.md
UX States
Every user interface exists in more states than just the ideal "happy path" with complete data. This skill enforces a disciplined state matrix for every user-facing component or flow before code is written or merged.
The Six UI State Dimensions
When designing, specifying, prototyping, or implementing a frontend surface, systematically define all six dimensions:
1. Empty States
- First use: What does a new user see before any data has been created? Provide clear guidance and a prominent call to action.
- Zero search or filter results: What happens when a search or filter yields nothing? Tell the user which filter caused the empty list and offer a single-click reset.
- Cleared state: What does the screen display after a user deletes or clears all existing items?
2. Loading & Latency States
- Initial fetch: Use skeleton loaders matching the target layout to prevent layout shift (CLS).
- Subsequent refetch or filtering: Use subtle inline spinners or progress indicators that preserve existing content rather than blanking the screen.
- Debounced input: For search inputs or live validations, define the debounce delay (typically 200ms to 300ms) and show an active evaluating state if the operation exceeds 150ms.
- Perceived speed: Defer non-critical widgets so the primary interaction renders first.