Index of every page on this site: llms.txt
All skills
david-evans03 avatar

/expo-safeareaview-guidlines

@6465931
Run it yourself

Applies safe-area layout rules for Expo/React Native screens, especially with React Navigation headers. Use when content overlaps the notch/status bar, spacing feels inconsistent, or `headerTransparent: true` is enabled.

  • 1 file
  • 2.6 KB
  • Updated 9 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/david-evans03/skills/expo-safeareaview-guidlines

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈62 tokens for metadata: the name and description. ≈585 when used: this file.

Description uses 3.1% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈250 characters, or 3.1%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Expo SafeAreaView Guidelines

When To Use

Use this skill when:

  • a stack screen uses headerTransparent: true,
  • content appears under the notch/status bar unexpectedly,
  • top spacing differs between screens,
  • safe area decisions are unclear in Expo Router apps.

Non-Negotiable Rule

If a stack/screen uses headerTransparent: true, each page in that flow must handle the top safe area in its content container.

Preferred approach for this project:

  • add a SafeAreaView inside each page/screen component as the top-level wrapper,
  • keep flex: 1,
  • ensure the visible top background is intentional.

This is required because transparent headers do not create top content spacing for you.

Standard Layout Pattern

For pages under a transparent header:

  1. Page root container: SafeAreaView (flex: 1).
  2. Inner content wrapper for actual UI.
  3. Explicit background at the top area (screen or wrapper), not accidental transparent layering.

If a page cannot use SafeAreaView, use useSafeAreaInsets() and apply paddingTop: insets.top manually.

Implementation Checklist

  • headerTransparent: true is present? If yes, safe-area handling exists in each page.
  • Screen root is SafeAreaView with flex: 1.
  • No missing wrapper on any route in the flow.
  • Background behind top inset is intentional and consistent.
  • No double top spacing from stacked wrappers.

Common Pitfalls

  • Relying on navigator header options to handle content inset for transparent headers.
  • Using contentStyle: { backgroundColor: 'transparent' } without defining page-level background.
  • Having some pages wrapped in SafeAreaView and others not, causing jumpy alignment.
  • Nesting multiple top-safe-area wrappers and creating extra padding.

Decision Rules

  • Transparent header flow: safe area is a screen responsibility.
  • Opaque header flow: still use safe area for predictable notch handling, but top overlap risk is lower.
  • Mixed backgrounds/images: prefer explicit per-screen control over implicit behavior.

QA Pass Before Merge

  • Navigate every screen in the flow on iOS and Android.
  • Confirm title/back button and first content row do not collide.
  • Confirm status bar region remains readable on every route.
  • Confirm transitions do not cause temporary top overlap artifacts.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 6465931. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 9 months ago

README badge

README badge for david-evans03/skills/expo-safeareaview-guidlines