# ui-safe-area-scroll

ui-safe-area-scroll is a Claude Code rule that enforces native iOS safe area handling in React Native ScrollViews. It stops layout jumping during keyboard transitions.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 88 repo stars
- Author: alexj11324
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/alexj11324/Mikka/tree/HEAD/.claude/skills/react-native-skills/rules/ui-safe-area-scroll.md
- Updated: 2026-11-17
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/ui-safe-area-scroll

## What it does

The rule instructs agents to assign `contentInsetAdjustmentBehavior="automatic"` to the root `ScrollView`. It actively prevents enclosing scroll containers inside `SafeAreaView` components or computing top padding with safe area insets hooks.

Native iOS inset adjustments let lists flow behind the status bar. The layout adapts dynamically when on-screen toolbars or keyboards open, avoiding shifts in UI elements.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/ui-safe-area-scroll.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/ui-safe-area-scroll.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/ui-safe-area-scroll.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/ui-safe-area-scroll.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/ui-safe-area-scroll.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/alexj11324/Mikka/tree/HEAD/.claude/skills/react-native-skills/rules/ui-safe-area-scroll.md

## When to use it
- stop wrapping React Native ScrollView elements in SafeAreaView
- eliminate manual top padding calculations via safe area hooks
- allow scrollable content to pass behind the iOS status bar
- prevent layout shifts when dynamic toolbars or keyboards appear

## Example prompts
- Create a settings screen with a ScrollView that respects iOS safe areas
- Refactor this screen to remove SafeAreaView from around the scroll container
- Fix the list layout so it scrolls behind the status bar naturally

## Similar
- [safe-area-handling](https://affpapa.org/en/nevibecode/skills/safe-area-handling.md) — skill · 1400 installs
- [maui-safe-area](https://affpapa.org/en/nevibecode/skills/maui-safe-area.md) — skill · 4200 installs
- [ui-measure-views](https://affpapa.org/en/nevibecode/rules/ui-measure-views.md) — rule · ★ 1216 repo stars
- [iphone-duo-adaptive-layout](https://affpapa.org/en/nevibecode/skills/iphone-duo-adaptive-layout.md) — skill · 1000 installs
- [expo-native-ui](https://affpapa.org/en/nevibecode/skills/expo-native-ui.md) — skill · 39400 installs
- [expo-brownfield](https://affpapa.org/en/nevibecode/skills/expo-brownfield.md) — skill · 32500 installs

From the same set: [alexj11324/mikka](https://affpapa.org/en/nevibecode/by/alexj11324/mikka.md) — 47 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
