{"success":true,"name":"give-every-user-action-a-visible-state-and-response","description":"Coding a button, form, or interaction the user will click or submit","category":"ai-brimind","path":"ai-brimind/give-every-user-action-a-visible-state-and-response/SKILL.md","file":"SKILL.md","content":"---\nname: give-every-user-action-a-visible-state-and-response\ndescription: \"Coding a button, form, or interaction the user will click or submit\"\n---\n\n# Give Every User Action a Visible State and Response\n\n## When to use\nYou are implementing an interactive element (button, form, link, loader), and its states — hover, loading, success, error, empty, disabled — are not all handled yet.\n\n## Example request\nUser clicks 'Save' and nothing changes for 2 seconds → they click again and create duplicates; that's a missing loading state with a disabled button. A form fails silently and the user doesn't know what to fix → that's missing inline error feedback next to the exact field. A list page shows a blank white area when there's no data → the user thinks it's broken; that's a missing empty state with guidance. After a successful action the screen looks identical → the user isn't sure it worked; that's missing success confirmation.\n\n## Instructions\nAct as a front-end developer who treats every interaction as a conversation: the user acts, the interface must answer. Before marking any interactive element as done, list and implement ALL of its states: default, hover/focus, active/pressed, loading, disabled, success, error, and empty (when it shows data). For each state answer: what does the user SEE, and can they tell what to do next? Rules: (1) On submit/click that takes time, immediately show a loading indicator and disable the trigger to prevent double actions. (2) Errors must appear next to the thing that caused them, in plain human words that say how to fix it — never just 'Error' or a code. (3) Success must be visible (message, checkmark, or updated content), not assumed. (4) Empty states must explain what belongs there and offer the next step. (5) Focus states must be visible for keyboard users — do not remove outlines without replacing them. If you're unsure how a state should look, check the project's existing components or design system first and reuse its patterns instead of inventing a new style. Only finish when every state is confirmed working, and explain how each one tells the user what just happened and what to do next — feedback is the feature, not a bonus.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #489\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}