Skip to content
cap-go avatar

Safe Area Handling

Complete safe-area guide for Capacitor covering notches, Dynamic Island, home indicators, and Android cutouts and system bars.

CCM score
71 of 100
skills.sh installs
1.5K
GitHub stars
79
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers viewport-fit=cover with env(safe-area-inset-*) CSS, the Capacitor 8 SystemBars plugin, and iOS contentInset behavior
  • Explains Android 15/16 enforced edge-to-edge, including why StatusBar overlay and background calls stop working at targetSdk 36
  • Provides a layout-shell CSS fallback chain using --safe-area-inset-* variables for Android WebView below 140
  • Designed for apps where headers, tab bars, or landscape and iPad layouts break after device changes or a Capacitor 8 upgrade

Install

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

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/cap-go/capgo-skills
Categories
Mobile Apps, Frontend & UI Code
First seen
Jun 3, 2026

Questions

What does the safe-area-handling skill fix in a Capacitor app?

It fixes content overlapping the iPhone notch, Dynamic Island, home indicator, Android display cutouts and system bars. It covers viewport-fit=cover with env(safe-area-inset-*), the Capacitor 8 SystemBars plugin and enforced edge-to-edge on Android 15 and 16.

How do I install the safe-area-handling skill?

Run npx -y skills add cap-go/capgo-skills --skill safe-area-handling -y in your project. The agent then gets guidance for headers under the status bar, tab bars behind the gesture bar and env() returning 0 on Android.

When should I not use the safe-area-handling skill?

Skip it for keyboard overlap, which belongs to capacitor-keyboard, and for Ionic or Konsta component theming, which belong to ionic-design and konsta-ui. It also does not cover Tailwind setup or iOS multi-window resizability.

More from cap-go/capgo-skills

All 41

Similar to Safe Area Handling

More Mobile Apps