Skip to main content
rule CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/ui-native-modals.md
Open on GitHub

What 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.md

The paths frontmatter field limits the files

Step 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.

Similar IDE rules

All IDE rules for Mobile →

From the same set47

The whole set →
react-state-fallback react-state-fallback is a Claude Code rule that enforces reactive fallbacks instead of copying props into component state. It prevents stale UI bugs during parent updates. CX Codex +1 ★ 88repo stars list-performance-virtualize list-performance-virtualize is a Claude Code rule that recommends virtualized lists for scrollable content. It applies while building list-based screens. CX Codex +1 ★ 88repo stars react-state-minimize react-state-minimize is a Claude Code rule that enforces minimal React state. It directs assistants to compute values on render rather than storing redundant state variables. CX Codex +1 ★ 88repo stars rendering-no-falsy-and rendering-no-falsy-and is a Claude Code rule that guards against unsafe conditional JSX rendering. It targets cases where a value may be an empty string or zero. CX Codex +1 ★ 88repo stars scroll-position-no-state scroll-position-no-state is a Claude Code rule that forbids keeping scroll position in useState. It applies to React Native scroll handlers. CX Codex +1 ★ 88repo stars impeccable-audit impeccable-audit is a Claude Code skill that reviews Mikka interfaces for UX resilience and visual clarity. It audits screens, responsive behavior, accessibility and interface states. CX Codex +1 ★ 88repo stars web-design-guidelines web-design-guidelines is a Claude Code skill that audits Mikka's web interface for accessibility, responsive layouts, forms, and interaction flows. CX Codex +1 ★ 88repo stars loop-me loop-me is a Claude Code skill that interviews you about a workflow and turns the answers into a specification. With no workflow to start from, it looks for recurring patterns in your workspace. CX Codex +1 ★ 88repo stars

Project sponsors

Companies that keep this analytics open