
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-codeInstalls 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-*)is0pxon Android, or correct only after rotation- Layout broke after Capacitor 8 upgrade or raising
targetSdkVersionto 35/36 StatusBar.setOverlaysWebView/setBackgroundColorstopped 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-toolbartheming:ionic-design; KonstasafeAreas: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- Capacitor Testing1.4K
- Capacitor Deep Linking1.3K
- Ios Android Logs1.3K
- Capacitor Security1.3K
- Capacitor Accessibility1.3K
- Capacitor Performance1.3K
- Capacitor App Store1.2K
- Capacitor Splash Screen1.2K
- Capacitor Push Notifications1.2K
- Capacitor Offline First1.1K
- Capacitor Keyboard1.1K
- Capacitor Ci Cd1K
- Tailwind Capacitor1K
- Capacitor Mcp961
- Capacitor Apple Review Preflight956
- Framework To Capacitor912
- Capgo Live Updates897
- Konsta Ui874
- Cocoapods To Spm836
- Capacitor App Upgrades815
- Cordova To Capacitor807
- Capgo Cli Usage773
- Capacitor Plugin Upgrades772
- Capacitor Plugin Spm Support756