AddThisFeature

Safe Area Insets

Stop notches, home indicators, and browser chrome from swallowing the interface.

moderate UI & Polish

What it adds

Insets applied at the viewport edges of edge-to-edge layouts, so fixed and full-bleed elements clear device hardware.

What your agent is told to do

5
  1. 1

    Identify every element that touches a viewport edge: fixed headers, bottom navigation, sticky action bars, drawers, toasts, and any full-bleed background. Those are the only places insets belong.

  2. 2

    Add the inset to the element's existing padding rather than replacing it, so a bar keeps its designed internal spacing on devices with no notch at all and simply gains the extra clearance where it is needed.

  3. 3

    Let the background extend to the physical edge while the content pulls inward. A bottom bar that stops short of the edge shows a strip of page behind it and reads as a rendering fault.

  4. 4

    Confirm the behaviour in portrait, in landscape where the inset moves to the sides, and in installed standalone mode where the browser chrome is gone and the insets are larger.

  5. 5

    Do not apply insets to elements sitting inside a padded container. They are already clear of the edge, and adding the inset there produces a visible double gap that appears only on affected devices.

Edge cases it handles

7
  • The inset must be combined with the component's own padding, not substituted for it, or the element loses its designed spacing on every device that reports no inset.
  • Only elements genuinely at a viewport edge need insets. Applying them anywhere in the middle of the layout adds space that nothing is avoiding and shifts content for no reason.
  • Landscape moves the insets to the left and right edges and changes the bottom one, so a layout verified only in portrait will have content under the notch as soon as the device is rotated.
  • Installed standalone mode removes the browser's own chrome and exposes larger insets than the same device shows in a browser tab, so both modes have to be checked separately.
  • A component that applies its own inset while an ancestor already applied one will double the gap, so ownership of each viewport edge must sit at exactly one level.
  • Sticky bottom elements and the on-screen keyboard both compete for the bottom edge, and the sticky action bar in the app already claims it — decide which element owns that edge rather than letting both add clearance.
  • The insets change value during scroll on mobile browsers as the address bar collapses and expands, so a layout that measures them once at load will be wrong a moment later.

Definition of done

9
  • Every element at a viewport edge clears the device's hardware in portrait and landscape.
  • Insets are added to existing padding rather than replacing it.
  • Backgrounds reach the physical edge while their content stays clear of it.
  • No element receives an inset from more than one level of the tree.
  • Elements inside padded containers carry no inset of their own.
  • Installed standalone mode and in-browser mode both render without clipped or obscured content.
  • Layout remains correct as mobile browser chrome collapses and expands during scroll.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 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.