Mobile Keyboard Avoidance
Keep the field being typed in, and the button that submits it, visible above the keyboard.
What it adds
Coordinated handling of the on-screen keyboard so the focused input and the primary action stay in view while it is open.
What your agent is told to do
5
What your agent is told to do
5-
1
Identify every screen where a user types on a phone — sign-in, search, comment boxes, checkout, bottom sheets, inline table editors — and confirm for each that the focused field and its submit control remain visible with the keyboard open.
-
2
React to the visual viewport rather than the layout viewport. The layout viewport often does not change when the keyboard opens, so anything keyed to it will believe nothing happened while the bottom half of the screen is covered.
-
3
Bring the focused field into view with the smallest movement that clears the keyboard, and leave a small margin above it. Centring every focused field yanks the page around and loses the user's place in a long form.
-
4
Decide explicitly what fixed footers, sticky action bars, and bottom sheets do when the keyboard opens: ride above it, or unstick and return to the document flow. Both are defensible, but a footer left pinned to the old bottom edge sits underneath the keyboard and its buttons cannot be pressed.
-
5
Do not treat every viewport height change as a keyboard event. Pinch zoom, browser chrome retracting on scroll, and rotation all change the reported height, and scrolling the page in response to them makes the app feel possessed. Choosing which height a container is sized against belongs to Viewport Height Utility; this brief owns only the reaction to the keyboard appearing and disappearing.
Edge cases it handles
7
Edge cases it handles
7- A pinch zoom shrinks the visual viewport exactly as a keyboard does. Treating the two as the same event makes the page scroll away under the user's fingers while they are trying to read something, so distinguish them by whether an input actually holds focus and by the scale factor.
- Scrolling the page in response to focus must be predictable and minimal. An unprompted jump that moves content the user was reading, or that fires again on every keystroke as the field grows, is worse than the field being partly obscured.
- Fixed footers, sticky action bars, and bottom sheets are the usual casualties: they stay glued to the pre-keyboard bottom edge and end up behind the keyboard, taking the submit button with them. Every bottom-anchored element needs a defined keyboard behaviour, and only one of them may own the bottom edge.
- When the keyboard closes, the previous scroll position must be restored rather than left wherever the avoidance logic pushed it. Landing the user halfway down a form they had already scrolled past is disorienting.
- Different platforms report the keyboard differently and some do not report it at all until after it has finished animating, so the layout must settle correctly rather than assuming a single resize event arrives at a useful moment.
- Predictive text bars, autofill suggestion strips, and hardware keyboards attached to tablets all change the covered height without a conventional keyboard being present, so the calculation must use the measured obscured area rather than an assumed keyboard height.
- Moving focus between two adjacent fields must not re-run a full scroll animation each time. Tabbing through a form should feel continuous, not like a series of jumps.
Definition of done
8
Definition of done
8- The focused input and its associated submit control remain visible while the on-screen keyboard is open, on every screen where users type.
- Pinch zoom and browser chrome changes do not trigger keyboard avoidance behaviour.
- Scroll adjustments are the minimum needed to clear the keyboard and do not repeat on every keystroke.
- Every bottom-anchored element has a defined behaviour when the keyboard opens, and none is left unreachable behind it.
- Closing the keyboard restores the scroll position the user had before it opened.
- The obscured area is measured rather than assumed, so predictive bars and hardware keyboards behave correctly.
- 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.