ui-native-modals — Claude Code rule: what it does, how to install
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.
AGPL-3.0 ★ 88 updated 2026-11-17
.claude/rules/ui-native-modals.mdWhat ui-native-modals 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'.
What it helps with
- 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 for the agent
- 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
How to install ui-native-modals
Manually: put the files in place
.claude/rules/ui-native-modals.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/ui-native-modals.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/ui-native-modals.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/ui-native-modals.mdManually: put the files in place
.clinerules/ui-native-modals.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about ui-native-modals
How to install ui-native-modals in Claude Code?
Save the rule definition into .claude/rules/ui-native-modals.md inside your repository.
What does ui-native-modals do?
It instructs coding models to construct modal views using native primitives such as <Modal presentationStyle="formSheet"> or React Navigation v7 native sheets rather than JS bottom sheet libraries.
Which React Navigation release does this rule target?
It targets React Navigation v7, which includes native form sheet presentations and detent configuration options.