cap-go avatar

Safe Area Handling

This walks you through handling iPhone notches, Dynamic Island, home indicators, and Android cutouts in Capacitor apps using CSS environment variables like safe-area-inset-top and safe-area-inset-bottom. You get concrete examples for headers, tab bars, and full-bleed layouts, plus React hooks and Vue composables if you need to read inset values in JavaScript. The CSS approach is usually cleaner since you can just use env() with calc() for combined padding, but the JavaScript solutions are handy when you need dynamic calculations. Don't forget viewport-fit=cover in your meta tag or the insets won't work. Most useful when users report content disappearing under the notch or home indicator on modern devices.

skills.sh installs
1.4K
GitHub stars
77
last updated
Aug 21, 2026

Install

$ npx -y skills add cap-go/capgo-skills --skill safe-area-handling --agent claude-code

Installs into .claude/skills of the current project.

Files

Safe Area Handling in Capacitor

When to Use

TRIGGER when:

  • Content renders under the status bar, notch, Dynamic Island, cutout, home indicator, or Android navigation/gesture bar
  • env(safe-area-inset-*) is 0px on Android, or correct only after rotation
  • Layout broke after Capacitor 8 upgrade or raising targetSdkVersion to 35/36
  • StatusBar.setOverlaysWebView / setBackgroundColor stopped working on Android
  • Landscape / split-screen / iPad windowed layouts have wrong side padding

Do not use:

  • Keyboard covering inputs: capacitor-keyboard
  • Ionic ion-header/ion-toolbar theming: ionic-design; Konsta safeAreas: konsta-ui
  • Tailwind plugin/utility setup: tailwind-capacitor
  • iOS scene sizing, UIScreen.main, multi-window: capacitor-ios-resizability
  • Splash screen colors: capacitor-splash-screen

Facts that drive every decision

Sponsors

Details

Repository
github.com/cap-go/capgo-skills
Categories
Frontend Development, Documentation, Mobile Development
First seen
Jun 3, 2026

More from cap-go/capgo-skills

All 41
1upstash avatardocumentation-lookupupstash/context7This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation1.4Kskills.sh installs
2tanstack-skills avatartanstack-rangertanstack-skills/tanstack-skillsHeadless utilities for building range and multi-range sliders in TS/JS, React, Vue, Solid, Svelte & Angular.1.3Kskills.sh installs
3bear2u avatarlanding-page-guide-v2bear2u/my-skillsCreate distinctive, high-converting landing pages that combine proven conversion elements with exceptional design quality. Build beautiful, memorable landing pa1.3Kskills.sh installs
4thesysdev avataropenuithesysdev/openuiUse for building, debugging, integrating, migrating, or documenting OpenUI, OpenUI Lang, Agent Interface, OpenUI Cloud, @openuidev packages, streaming generativ1.3Kskills.sh installs
5ognjengt avatarcro-optimizationognjengt/founder-skillsAnalyzes landing pages and provides detailed CRO (Conversion Rate Optimization) recommendations. Use when user provides a landing page URL or HTML/CSS code and 1.3Kskills.sh installs
6ailabs-393 avatarseo-optimizerailabs-393/ai-labs-claude-skillsThis skill should be used when analyzing HTML/CSS websites for SEO optimization, fixing SEO issues, generating SEO reports, or implementing SEO best practices. 1.3Kskills.sh installs