
Safe Area Handling
Handles the notch, Dynamic Island, home indicator, and display cutouts so your Capacitor app doesn't put content where users can't see it. The guide covers CSS environment variables like safe-area-inset-top with proper viewport-fit=cover setup, plus JavaScript solutions for reading insets dynamically and React/Vue hooks if you need programmatic control. It's especially helpful when building tab bars or full-bleed layouts where you want background colors to extend to screen edges but interactive elements to stay in safe zones. The examples are complete enough to drop into real projects, and it covers both portrait and landscape orientation changes.
- skills.sh installs
- 203
- GitHub stars
- 43
- last updated
- Jun 3, 2026
Install
$ npx -y skills add cap-go/capacitor-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
Promote your product hereReach 125k+ visitors monthlyPromote your product hereReach 125k+ visitors monthly
Agent CaffeineSponsoredClose your lid, come back to finished work
SnugSponsoredThe clipboard manager for the AI eraPromote your product hereReach 125k+ visitors monthly
WaxSponsoredBlock anything with supervision, without erasing your iPhonePromote your product hereReach 125k+ visitors monthly
knobsSponsoredSee your site on any phone, any day, in any language
Details
- Repository
- github.com/cap-go/capacitor-skills
- Category
- Mobile Development
- First seen
- Jun 3, 2026
More from cap-go/capacitor-skills
All 13Recommended
More Mobile Development2
limrun-detox-testinglimrun-inc/skillsConfigure, run, or debug Detox on Limrun iOS simulators. Use when attaching the Limrun Detox runtime to an app, wiring Detox mediator connectivity, or validatin44.5Kskills.sh installs
3
limrun-maestro-testinglimrun-inc/skillsRun Maestro YAML flows against a Limrun cloud iOS simulator with `lim ios maestro`, from any environment (Linux, Windows, macOS, VM, container). Use when the us42.6Kskills.sh installs
4
argent-tv-interactsoftware-mansion/argentControl and inspect TV apps via argent — Apple TV (tvOS), Android TV (leanback), and Amazon Fire TV (Vega). Boot the target, read focus, navigate with the D-pad24.5Kskills.sh installs
5
heroui-nativeheroui-inc/herouiHeroUI Native component library for React Native (Tailwind v4 via Uniwind). Use when building mobile UIs with HeroUI Native — creating Buttons, Cards, TextField11.2Kskills.sh installs
6
cmux-custom-sidebarmanaflow-ai/cmuxBuild a custom cmux sidebar from a plain-language request. Use when the user asks for a custom sidebar, a sidebar that shows their workspaces/tabs/PRs/clock, a 5Kskills.sh installs