Hover
Pointer feedback for mouse and trackpad users.
Hover and focus states are interaction feedback. Hover helps pointer users; focus shows keyboard users where they are.
.link:hover { color: var(--green); }
.link:focus-visible { outline: 3px solid var(--focus); }
Motion mental model
Hover appears when a pointer rests over an element. Focus appears when an element becomes the active target for keyboard, script or pointer interaction.
A professional interface treats focus as seriously as hover. Keyboard users need to see where they are before activating anything.
Do not hide essential controls behind hover only. Touch devices may not have hover, and keyboard users may never trigger it.
Pointer feedback for mouse and trackpad users.
The active element in the interaction flow.
A smarter focus style that usually appears for keyboard navigation.
The pressed state during activation.
Visual model
The component is idle but understandable.
The component invites a click.
The component is clearly selected.
The component responds to activation.
Good CSS versus fragile CSS
.link:hover { color: var(--green); }
.link:focus-visible {
outline: 3px solid var(--focus);
outline-offset: 4px;
}
.link { outline: none; }
.link:hover .hidden-action { display: block; }
Rules of thumb
outline: none is a bug unless a better focus style exists.
Important content and controls must be available without hover.
It gives keyboard users focus indication without over-showing rings on mouse clicks.
Hover should invite interaction, not change the entire layout.
Pressed feedback makes buttons feel physical and responsive.
Keyboard testing is the quickest way to catch broken interaction states.
Production thinking
Hover and focus states are how users know the page is listening. Without them, an interface feels static and uncertain.
Visible focus is a core accessibility requirement. Hover-only disclosure is fragile for keyboard and touch users.
Build a state checklist: default, hover, focus-visible, active, disabled, selected and error where relevant.
Interaction states do not directly rank, but inaccessible navigation can block users and crawlers from discovering content cleanly.
Live code lab
The preview runs in an isolated iframe. Links and forms stay inside the practice area, so you can experiment without leaving the lesson.
Mini assignment
Practice assignment
Try it yourself
Self-check
Answer these questions before moving on. If the motion has no purpose, no fallback or no state clarity, it is not production motion yet.
Senior audit upgrade
Hover can polish a pointer interface, but it cannot be the only way to reveal important information or actions.
Use hover media queries for hover-specific effects.
Anything hover reveals should usually also be available on focus.
Mobile users need visible controls or tap behavior.