Rn styling
Use when styling React Native + Expo components: choosing between StyleSheet/NativeWind/inline, wiring NativeWind v4 from DESIGN.md tokens, handling Flexbox in RN (column-by-default, not row), safe-area insets, dark mode, responsive design with useWindowDimensions, optimized images via expo-image, performant lists via FlashList, and choosing NativeWind vs real native components via @expo/ui (SwiftUI/Jetpack Compose). Triggers on: "style this screen", "add dark mode", "fix safe area", "import design tokens", "set up NativeWind", "native settings screen", "@expo/ui", or when an agent is about to write StyleSheet/className in an RN file. Not for: building screens end-to-end (rn-add-screen, Wave 2), navigation (rn-expo-router), animations (rn-animations-gestures, Wave 3), or web styling (Next.js stack).From its SKILL.md
npx -y skills add lukedj78/dev-flow --skill rn-stylingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.9 KB, 798 tokens by cl100k_base, as published. Nobody here has run it
rn-styling — guardrail for styling in React Native + Expo
The 5 rules (non-negotiable)
- NativeWind v4 is the default.
StyleSheetonly for performance-critical paths (per-frame animations etc.). - No magic numbers. Every spacing/color/radius/font value comes from
tailwind.config.js(which mirrors the project's DESIGN.md tokens). - SafeArea mandatory on every root screen. Use
SafeAreaViewfromreact-native-safe-area-context(NOT the one fromreact-native). - Dark mode via
useColorScheme+ Tailwinddark:variant. NeverAppearance.getColorScheme()at module top-level. - Optimized primitives:
expo-imageinstead ofImage;@shopify/flash-listfor any list > 20 items.
Quick decision tree
- "Should I style this with NativeWind or StyleSheet?" →
references/decision-tree.md - "How do I set up NativeWind v4 from scratch?" →
references/nativewind-setup.md - "Why does Flexbox behave differently than on the web?" →
references/concepts.md - "What are the common patterns and anti-patterns?" →
references/patterns.md - "Show me a real example" →
references/examples/ - "I need this screen to feel native, not just look styled" (grouped settings, native toggle/picker/slider, real bottom sheet) → this isn't a styling question, it's
references/expo-ui.md(@expo/ui) — real SwiftUI/Jetpack Compose components, not RN primitives.
NativeWind vs @expo/ui — two different tools
- NativeWind (this skill's default) styles RN's own primitives (
View,Text, …) with utility classes. It changes how things look. @expo/ui(seereferences/expo-ui.md,[VERIFY]against mcp.expo.dev) renders actual native components — SwiftUI on iOS, Jetpack Compose on Android — not styled primitives. Reach for it when a screen needs to genuinely behave like a native settings/picker/sheet screen, not when it just needs the right colors and spacing.- They compose: an
@expo/uitree can sit inside a NativeWind-styled screen. Don't use@expo/uias a general-purpose styling system, and don't expect NativeWind classes to apply inside its native components.
Common anti-patterns (NEVER do)
- ❌
style={{ padding: 16 }}with a magic number — pull from token. - ❌ Root
<View>withoutSafeAreaViewfromreact-native-safe-area-context. - ❌
import "tailwindcss"directly in code — only NativeWind imports. - ❌
Appearance.getColorScheme()at module level — useuseColorScheme()hook. - ❌
Imagefromreact-nativefor remote URIs — useexpo-image. - ❌
flex: 1on root + scroll withoutcontentContainerStyleonScrollView— content gets clipped.
Sources
- Course: codewithbeto.dev/rnCourse — lesson 10 "Styling Your App" (free).
- Official: https://docs.expo.dev/develop/user-interface/styling/
- Official: https://www.nativewind.dev/ (v4)
- Official: https://github.com/AppAndFlow/react-native-safe-area-context
- Official: https://docs.expo.dev/versions/latest/sdk/ui/ (
@expo/ui) —[VERIFY]exact import paths/SDK floor via mcp.expo.dev, seereferences/expo-ui.md
What ships with it: 9 files
16.5 KB alongside SKILL.md
references/
- concepts.md2.6 KB
- decision-tree.md1.7 KB
- examples/dark-mode-toggle.tsx811 B
- examples/.gitkeep0 B
- examples/responsive-card.tsx1.0 KB
- examples/safe-area-layout.tsx710 B
- expo-ui.md4.8 KB
- nativewind-setup.md2.5 KB
- patterns.md2.4 KB