ui-view-states-forms
Installation
SKILL.md
UI View States And Forms
Design the view around user decisions, data states, permissions and feedback, not only around the happy-path mockup.
Process
- Identify the primary user goal, most important information, main action, destructive actions, and what should be visible first.
- Model all relevant states before coding: first load, background refetch, empty, partial, permission denied, validation error, server error, network error, rate limit, offline, readonly, disabled, stale data and deleted entity.
- Keep loading states proportional; use cached data plus small refresh indicators when possible, and match skeleton dimensions to final layout.
- Make empty states explain why there is no data and provide a next action when the user can act.
- Make errors actionable and distinguish validation, system, auth, conflict, rate-limit and network failures.
- For forms, provide labels, field-level errors, keyboard support, double-submit protection, focus after submit errors, and no data loss after API errors.
- For tables and lists, show only decision-relevant fields, provide mobile-friendly alternatives, and avoid hiding task-critical data in truncation.
- For optimistic UI, implement rollback and avoid it for destructive, financial, backend-rule-heavy or conflict-prone operations.