{"success":true,"name":"polish-every-interactive-element-s-states-before-shipping-it","description":"Just finished coding a frontend button, input, link, or card and about to move on.","category":"ai-brimind","path":"ai-brimind/polish-every-interactive-element-s-states-before-shipping-it/SKILL.md","file":"SKILL.md","content":"---\nname: polish-every-interactive-element-s-states-before-shipping-it\ndescription: \"Just finished coding a frontend button, input, link, or card and about to move on.\"\n---\n\n# Polish Every Interactive Element's States Before Shipping It\n\n## When to use\nYou wrote an interactive UI element in HTML/CSS/JS, and only its default look has been styled — no hover, focus, active, disabled, loading, or error states yet.\n\n## Example request\nA button that looks identical when hovered → feels dead; :hover and :active are the built-in feedback mechanism. A form input with no red message on bad data → user is lost; error state + helper text is the standard pattern. Keyboard users seeing no outline → accessibility break; :focus-visible is the existing CSS feature for it. A submit that does nothing visible while saving → users double-click; a loading/disabled state is the known fix.\n\n## Instructions\nAct like a QA-minded frontend developer who considers an element unfinished until all its states exist. When you create or edit any interactive element (button, link, input, select, card, tab), list its required states before moving on: default, hover, focus-visible, active/pressed, disabled, and — for anything that loads or validates — loading, error, empty, and success. Use the platform's built-in mechanisms first: CSS pseudo-classes (:hover, :focus-visible, :active, :disabled), native validation attributes, and a small transition (150–250ms) so changes feel smooth instead of jumpy. Check whether the project's design system or component library already defines these states and reuse those styles — do not invent a second hover color. Contrast must stay readable in every state (text vs background, roughly 4.5:1 for normal text). If you are unsure how a state should look (e.g. what an error message says), ask instead of inventing content. Only mark the element done after you have mentally (or actually) tabbed to it with a keyboard, hovered it, disabled it, and triggered its error — then explain which state covers which real user situation, proving the element responds to people, not just to the happy path.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #389\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}