Pointer Modality Styles
Make hover, focus, and hit targets behave correctly for mouse, touch, pen, and keyboard.
What it adds
Input-aware styling and interaction rules so each pointer type gets the affordances it can actually use.
What your agent is told to do
5
What your agent is told to do
5-
1
Audit the app for interactions that assume a mouse: hover-revealed row actions, tooltips that carry information available nowhere else, tiny icon buttons, and drag handles that only appear on hover.
-
2
Gate hover styling on the device genuinely supporting hover, rather than on screen width. A touchscreen laptop is wide and cannot hover reliably; a stylus tablet is narrow and can.
-
3
Raise the hit area for coarse pointers without changing the visual size of the control. The user should get a larger target, not a bigger-looking button that breaks the layout.
-
4
Keep the focus indicator visible for anyone navigating by keyboard, and suppress it only for pointer-initiated focus. Removing focus rings outright to tidy up mouse interaction makes the app unusable without one.
-
5
Do not resolve pointer type once at load and cache it for the session. Users plug in a mouse, pick up a pen, and switch to the keyboard mid-task, and a cached answer is wrong from that moment on.
Edge cases it handles
7
Edge cases it handles
7- Hybrid devices have more than one pointer at once — a laptop with a touchscreen, a tablet with a keyboard and trackpad case — so any rule that treats input as a single fixed capability will be wrong for one of them. Style from the capability being used now, and let the coarse-pointer accommodations remain available even when a mouse is attached.
- The keyboard focus indicator must never be hidden. It is the only way a keyboard user can tell where they are, and suppressing it to clean up mouse clicks removes the app's navigability rather than its clutter.
- Any action available only on hover is unreachable on touch. Row actions, delete buttons, and drag handles revealed by hover need a persistent or explicitly summoned equivalent — a visible control, a long press, or an overflow menu — and hover may only be an accelerator on top of it.
- Modality must be re-evaluated continuously during a session. A user who starts with touch and then attaches a keyboard should get focus rings from the next keypress, without reloading the page.
- A single interaction can produce both touch and mouse events, so logic keyed to a pointer type must not fire twice or leave a control stuck in a hover state after a tap.
- Tooltips that carry information found nowhere else are inaccessible to touch and to screen readers alike, so the underlying content must exist in the accessible name or visible copy, with the tooltip as a convenience.
- A stylus is a fine pointer with no hover on some devices and hover on others, so it must not be lumped in with touch and given oversized targets it does not need.
Definition of done
8
Definition of done
8- Hover styling is applied only where the device actually supports hover, not inferred from viewport width.
- No action exists that can be reached by hover alone.
- Keyboard focus is always visible, and focus styling is suppressed only for pointer-initiated focus.
- Coarse pointers get an enlarged hit area without a change in the control's visual size.
- Switching input method mid-session changes the affordances without a reload.
- A single tap produces one interaction, with no lingering hover state left behind.
- The feature matches the existing design system.
- No existing functionality is broken.
Related features
Beautiful Empty States
Beautiful Empty States
Replace blank screens with useful, contextual empty states.
What it does
Every list, table, and dashboard in your app has a "nothing here yet" state. Most
apps ship a blank rectangle — and it is often the very first thing a new user sees.
An empty state should say what belongs here, why it is empty, and what to do next.
How it works
- 1 Inventory the empty cases first. List every collection view in the app and
- 2 Distinguish the three kinds of empty. They are not the same, and must not
- 3 Build one reusable empty-state component from the existing design system,
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/beautiful-empty-states
Countdown Timer
Countdown Timer
A live countdown to a deadline that ends cleanly instead of running negative.
What it does
A countdown component driven by a server-provided deadline, with a defined finished state.
How it works
- 1 Send the deadline and the server's current time together, compute the offset between server and device once, and count against the corrected value. The device clock cannot be trusted to be right.
- 2 Recompute the remaining time from the corrected clock on every tick rather than decrementing a stored number, so a suspended tab does not resume showing a value minutes behind reality.
- 3 Define the finished state explicitly: what the component shows at zero, whether it reveals something, disables a control, or triggers a refetch. Reuse the app's existing Progress Indicator System styling rather than introducing new type and colour for the digits.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/countdown-timer
Expandable Text
Expandable Text
Shorten long text without making the full content hard to reach.
What it does
Long text clamped to a few lines, with an explicit control to show the rest and collapse it again.
How it works
- 1 Clamp by rendered lines, not by character count. Cutting a string at a fixed length breaks words, mangles markup, and truncates differently at every width.
- 2 Only show the expand control when the text is genuinely clipped. A 'Show more' on a two-line paragraph is noise.
- 3 Use a real button with an accessible label naming what expands, and expose the expanded state. An untagged 'more...' is invisible to a screen reader.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/expandable-text
How it works
-
1
Copy the link
Grab the Markdown instruction URL for this feature.
-
2
Give it to your AI
Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.
-
3
It inspects, then implements
Your agent reads your existing app first, then adds the feature to fit it.
Works with your stack
These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.
Need it tighter than that? Customize the feature and tell it exactly what you're running.