# ui-native-modals

ui-native-modals is a Claude Code rule that directs coding assistants to use native React Native modal elements instead of JavaScript-based bottom sheet packages.

- 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-native-modals.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-native-modals

## What it does

The rule instructs the agent to discard third-party JS bottom sheet dependencies in mobile layouts. It requires using the platform `<Modal>` component with `presentationStyle="formSheet"` or configuring screen presentation options inside React Navigation v7.

Platform modals handle swipe-to-dismiss actions, accessibility hooks, and keyboard layout shifts without extra JavaScript listeners. For stack navigators, the guideline specifies setting `presentation: 'formSheet'` alongside `sheetAllowedDetents: 'fitToContents'`.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/ui-native-modals.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-native-modals.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

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

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/ui-native-modals.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/ui-native-modals.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-native-modals.md

## When to use it
- replace custom JS bottom sheets with standard Modal
- set up formSheet screens using React Navigation v7
- enable gesture swipe dismissal without extra JS logic
- handle keyboard offsets properly on sheet overlays

## Example prompts
- Create a filter bottom sheet using the native Modal component
- Update the screen configuration to use React Navigation v7 formSheet
- Build a confirmation sheet that dismisses with a downward swipe

## Similar
- [react-native-design](https://affpapa.org/en/nevibecode/skills/react-native-design.md) — skill · 15522 installs
- [react-native-app](https://affpapa.org/en/nevibecode/skills/react-native-app.md) — skill · 510 installs
- [modals-dialogs](https://affpapa.org/en/nevibecode/skills/modals-dialogs.md) — skill · 601 installs
- [navigation-native-navigators](https://affpapa.org/en/nevibecode/rules/navigation-native-navigators.md) — rule · ★ 1216 repo stars
- [callstack-agent-skills](https://affpapa.org/en/nevibecode/skills/callstack-agent-skills.md) — skill · 200 installs
- [expo-native-ui](https://affpapa.org/en/nevibecode/skills/expo-native-ui.md) — skill · 39400 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
