react-native-design
This skill guides the creation of distinctive, production-grade React Native UI that avoids generic "AI slop" aesthetics and respects the hard constraints of the mobile platform. It acts as a complete UX/UI replacement — capable of generating color systems, designing screens from scratch, critiquing and improving existing UI, and making every design decision that a professional designer would make.
The user provides a screen, component, UI direction, app concept, or design problem. They may include context about the purpose, audience, target platform, existing styling approach, or preferred colors.
Core Philosophy
- Every pixel is a decision. Nothing should be accidental — not a color, not a spacing value, not a font choice.
- Design is problem-solving, not decoration. The UI must serve the user's task, not look impressive in a screenshot.
- Platform correctness is non-negotiable. Beautiful design that crashes or renders incorrectly is worthless.
- Consistency compounds. A simple system applied rigorously beats complex rules applied inconsistently.
- Intentionality over trends. A deliberate choice to be minimal is as powerful as a choice to be bold.
Design Thinking — Expanded Framework
Before touching any code, answer these questions (internally or by asking the user):
1. Purpose & Audience
- What problem does this app/screen solve?
- Who is the target user? (age, tech literacy, context of use — commuting? at home? at work?)
- What emotional response should the UI trigger? (trust, excitement, calm, urgency, delight)
- Will users spend seconds or minutes on this screen?
2. Aesthetic Direction
Commit to ONE personality. Do not default to "clean and modern" — that is a non-choice.
| Aesthetic |
Characteristics |
When to use |
| Cinematic / Immersive |
Deep darks, rich imagery, dramatic typography, ambient lighting effects |
Media, entertainment, streaming, photography |
| Editorial / Magazine |
Strong typographic hierarchy, asymmetric layouts, generous whitespace, bold headings |
Content-heavy, news, blogs, long-form reading |
| Luxury / Refined |
Restrained palette, subtle animations, premium materials feel, serif fonts |
Finance, premium services, fashion |
| Brutalist / Raw |
High contrast, exposed structure, monospace type, no rounded corners |
Developer tools, creative portfolios, avant-garde |
| Playful / Friendly |
Rounded shapes, saturated colors, bouncy animations, illustration-heavy |
Education, kids, social, gamified experiences |
| Utilitarian / Data-dense |
Compact layouts, tables/grids, monospace numbers, minimal decoration |
Dashboards, trading, analytics, productivity |
| Organic / Calm |
Muted earth tones, soft gradients, breathing animations, natural imagery |
Wellness, meditation, health, journaling |
| Neo-brutalist / Bold |
Thick borders, offset shadows, bright primaries, visible grid |
Creative tools, indie products, portfolios |
3. Theme Preference
- Dark: Depth, layers, glowing accents, contrast through luminosity
- Light: Whitespace, shadows for depth, color used sparingly
- Both (dual): Requires a token system that maps semantic roles, not hardcoded values
4. Differentiation
- What is the ONE thing a user will notice and remember?
- What makes this different from the 10 closest competitors?
CRITICAL: Intentionality beats intensity. A well-executed minimal design and a well-executed maximalist design are both excellent. A half-hearted attempt at either is not.
Color System — Complete Theory & Generation
This section enables creating professional color palettes from scratch, from user-provided colors, or improving existing ones.
Color Theory Fundamentals
Every professional palette is built on color relationships:
| Scheme |
Definition |
Character |
Best for |
| Monochromatic |
One hue, multiple tints/shades |
Elegant, cohesive, low cognitive load |
Utility apps, dashboards, minimalist brands |
| Analogous |
2-3 adjacent hues on the wheel |
Harmonious, natural, warm/cool bias |
Lifestyle, wellness, organic brands |
| Complementary |
Opposite hues (180°) |
High energy, vibrant tension |
CTAs, alerts, gaming, sports |
| Split-complementary |
Base + two adjacent to complement |
Vibrant but balanced, less harsh |
Most apps — versatile and dynamic |
| Triadic |
Three hues 120° apart |
Balanced energy, colorful but controlled |
Multi-category apps, social, creative tools |
Palette Generation Process
Starting from an app concept (no user colors):
Identify the emotional tone → pick a dominant hue family:
- Trust/stability → Blue (210°–240°)
- Energy/passion → Red-Orange (0°–30°)
- Growth/health → Green (120°–160°)
- Creativity/luxury → Purple (270°–310°)
- Warmth/optimism → Yellow-Orange (30°–60°)
- Calm/nature → Teal-Cyan (170°–200°)
- Sophistication/tech → Blue-Violet (240°–270°)
Choose a relationship scheme (split-complementary is the safest default)
Generate the full system using the token structure below
Starting from user-provided colors (1-3 colors):
Identify the provided color(s) as HSL values
Determine their role: is it accent? background? brand mark?
Derive the missing roles:
- If user gives 1 accent color: build surfaces around it (dark: desaturate + darken for backgrounds; light: tint for surfaces)
- If user gives 2 colors: determine their relationship, fill remaining slots
- If user gives a brand palette: respect the hierarchy, add functional colors (semantic states, surface layers)
Generate tints/shades of the accent at these stops: 50, 100, 200, 300, 400, 500 (base), 600, 700, 800, 900, 950
Improving an existing palette:
- Read ALL color tokens in the project
- Check for these common problems:
- Accent too close to semantic colors (can't distinguish "success" from "primary")
- Surface layers without enough contrast between steps (< 5% luminosity gap = invisible)
- Text colors that don't meet WCAG AA (4.5:1 for body, 3:1 for large text)
- Too many unique colors that don't relate to each other
- Borders/strokes that create unintended halos against their backgrounds
- Propose specific fixes with before/after hex values
Color Token Architecture — Mandatory Structure
Every theme MUST have these semantic layers. Names can vary by project convention, but the roles must be present:
SURFACES (background layers — establish depth)
├── base → absolute deepest background (dark: #070B11-ish, light: #F8FAFC-ish)
├── main → primary screen background
├── elevated → cards, modals, floating elements
├── overlay → scrim behind modals (semi-transparent)
└── interactive → hover/pressed states on surfaces
ACCENT (brand color)
├── main → primary accent (buttons, links, active states)
├── container → filled surfaces with accent (CTAs, badges, selected states)
├── subtle → tinted surfaces (sidebar active item, selected card bg)
├── on-accent → text/icon color ON the accent fill
TEXT (foreground hierarchy)
├── primary → highest contrast — titles, critical content
├── secondary → body text, descriptions
├── tertiary → muted — placeholders, metadata, timestamps
├── disabled → clearly inactive
└── on-color → text on colored surfaces (accent, semantic)
BORDERS (stroke hierarchy)
├── default → card borders, dividers
├── subtle → barely visible separators
├── strong → focused inputs, active states
└── accent → accent-colored borders
SEMANTIC (functional — MUST differ from accent)
├── success → main + surface + text
├── warning → main + surface + text
├── error → main + surface + text
└── info → main + surface + text
COMPONENT-SPECIFIC (optional but recommended)
├── button → primary/secondary/ghost/danger states
├── input → default/focused/error fills and strokes
├── navigation → tab colors, active indicators
└── card → specific card backgrounds if they differ from general surfaces
Dark Theme Color Rules
| Rule |
Guidance |
| Background base |
NEVER pure #000000. Use #050505–#121212. Tint the black with your brand hue for warmth |
| Surface steps |
Each layer 5-12% lighter. Minimum 4 layers. Test: put a card on the background — can you see the edge without a border? |
| Accent saturation |
Increase saturation 10-20% vs light theme. Muted accents disappear on dark |
| Accent luminosity |
The accent must be L≥50% in HSL to be readable against dark surfaces |
| Borders |
Use rgba(255,255,255, 0.08–0.15) or accent at low opacity. Anything below 8% opacity is invisible |
| Text primary |
#F1F5F9 to #FFFFFF (never below L:90%) |
| Text secondary |
rgba(255,255,255, 0.55–0.70) |
| Text tertiary |
rgba(255,255,255, 0.35–0.45) |
| Shadows |
Invisible. Don't waste code on them. Use border + elevation instead |
| Gradients |
Subtle — used for depth on CTAs or hero sections, not decoration |
Light Theme Color Rules
| Rule |
Guidance |
| Background base |
#F2F2F7 (iOS) or #F5F5F5 (Material). Not flat white |
| Card surfaces |
Pure #FFFFFF or near-white. Shadows create separation |
| Accent saturation |
Can be lower than dark theme — the contrast is already there |
| Accent luminosity |
Must be L≤45% for readable text on white backgrounds |
| Borders |
rgba(0,0,0, 0.06–0.12) for subtle dividers |
| Text primary |
#1C1C1E to #000000 |
| Text secondary |
rgba(0,0,0, 0.55–0.65) |
| Shadows |
Essential for hierarchy — shadowOpacity: 0.04–0.12 for cards, 0.15–0.25 for modals |
Dual Theme System (Light + Dark)
When building both themes:
- Never hardcode colors in components — always reference semantic tokens
- Map by role, not by value —
background.main resolves to different hex per theme
- Implementation patterns (detect what the project uses):
// styled-components: ThemeProvider swap
const darkTheme = { colors: { bg: { main: '#0C1219' }, ... } };
const lightTheme = { colors: { bg: { main: '#F8FAFC' }, ... } };
// NativeWind: dark: prefix OR CSS variables
// className="bg-surface-main dark:bg-surface-main-dark"
// Context-based: useTheme() hook returning current tokens
- Test both themes — every component must be verified against both palettes
Accessibility — Color Contrast Requirements
| Element |
Minimum ratio (WCAG AA) |
Target ratio |
| Body text on background |
4.5:1 |
7:1 (AAA) |
| Large text (≥18px bold, ≥24px) |
3:1 |
4.5:1 |
| UI components (borders, icons) |
3:1 |
4.5:1 |
| Decorative/disabled |
No requirement |
— |
Quick contrast check formula (for dark themes):
- Text at
rgba(255,255,255, 0.87) on #1C1C1E = ~12:1 ✓
- Text at
rgba(255,255,255, 0.60) on #1C1C1E = ~8:1 ✓
- Text at
rgba(255,255,255, 0.38) on #1C1C1E = ~5:1 ✓ (large text only)
For accents as text: The accent color must have ≥4.5:1 against its surface. Teal #2DD4BF on #0C1219 ≈ 9:1 ✓. But teal on #253244 ≈ 5.5:1 — use with caution on elevated surfaces.
Theme Creation — Step-by-Step Workflows
Workflow A: Create a Theme from Scratch (New App)
When a user says "I'm building an app for X, create a theme":
- Ask or infer the app category, audience, and aesthetic direction
- Choose a dominant hue based on the emotional tone (see table above)
- Select a color scheme (default to split-complementary unless the app is clearly monochromatic)
- Generate the full token structure following the Color Token Architecture
- Select fonts:
- Display/brand: distinctive, memorable (not Inter/Roboto/system default)
- Body/UI: highly legible, with available weight variants
- Use
@expo-google-fonts for easy loading
- Define the type scale (minimum: display, title, headline, body, caption, label)
- Define spacing (4pt or 8pt base grid)
- Define border radius (consistent set: none, sm, md, lg, full)
- Output: Complete theme file + type definitions + font loading instructions
Workflow B: Improve an Existing Theme
When a user says "improve my colors" or "the UI feels off":
- Read all theme files (colors, typography, spacing, components)
- Audit against the rules in this skill:
- Surface contrast steps sufficient?
- Accent readable on all its surfaces?
- Semantic colors distinct from accent?
- Typography hierarchy has enough range? (min 3:1 ratio between smallest and largest)
- Spacing consistent with a grid?
- Identify top 3 issues — prioritize by visual impact
- Propose changes with exact hex values, showing before → after
- Explain the reasoning briefly (not pages of theory — just "this fixes X because Y")
Workflow C: Create a Theme from User Colors
When a user provides specific colors:
- Analyze the colors — convert to HSL, identify hue family, saturation, luminosity
- Assign roles: which is accent? which is surface? Let the most saturated/distinctive color be the accent
- Generate complementary colors using the theory above
- Build the full surface stack around the provided colors
- Verify contrast of every text/surface combination
- Output: Complete theme, noting which colors are user-provided vs generated
Workflow D: Design a Specific View
When a user says "design a login screen" or "create a profile view":
- Inspect existing theme and components — work within what exists
- Select the appropriate screen pattern from the catalog below
- Apply the theme tokens — never introduce new colors not in the system
- Structure the layout following the Layout Decision Framework
- Handle all states: default, loading, error, empty, success
- Output: Complete view code, styles, and types if applicable
Screen Pattern Catalog
Reference designs for common screens. Each pattern includes structure, key design decisions, and what separates good from great.
Authentication (Login / Register / Forgot Password)
Structure: Centered form, minimal distraction, clear primary CTA, secondary links below.
| Decision |
Guidance |
| Visual weight |
The input fields and CTA should dominate — minimize logos and decoration |
| Background |
Solid dark/light surface OR subtle gradient. Never busy imagery that competes with inputs |
| Inputs |
Generous height (48-56pt), clear focus states, inline validation |
| CTA |
Full-width, high contrast, immediate loading feedback |
| Social login |
Secondary visual weight — below the primary form |
| Keyboard |
Must not cover the active input. Use KeyboardAvoidingView + scroll |
| Error display |
Inline per-field (red text below input) + optional toast for network errors |
Great: Smooth keyboard transitions, immediate field validation, subtle brand personality through font/color choice, haptic on submit.
Home / Dashboard
Structure: Scrollable surface with sections — greeting/status → primary content → secondary content.
| Decision |
Guidance |
| Header |
Personalized greeting OR key metric. Not generic "Welcome back" |
| Content hierarchy |
What does the user want MOST when they open the app? That goes first |
| Cards vs List |
Cards for visual/browseable content (media, products). Lists for scannable data (tasks, messages) |
| Empty first-use |
Dedicated onboarding prompt, not just "No items yet" |
| Pull-to-refresh |
Expected if data is remote |
| Floating action |
Only if there's ONE dominant creation action |
Great: Content-first (data visible without scrolling), progressive disclosure, personalized ordering.
Detail View (Item/Product/Content)
Structure: Hero image/visual → title + metadata → body content → actions.
| Decision |
Guidance |
| Hero |
Full-width image or large visual. Aspect ratio 16:9 or 3:4 for media |
| Scroll behavior |
Image collapses on scroll, title becomes the header (parallax optional) |
| Metadata |
Compact row: date, category, rating — secondary text weight |
| Actions |
Sticky bottom bar OR contextual buttons within content |
| Back navigation |
Always visible — overlay on hero image if present |
Great: Smooth scroll-linked transitions, image loading with shimmer/blur-up, rich metadata without clutter.
List / Collection
Structure: Optional filters/tabs at top → scrollable list → empty state.
| Decision |
Guidance |
| Layout |
Vertical list for text-heavy items. Grid (2-3 columns) for visual items (photos, products) |
| Item height |
Consistent per type. Text list: 64-88pt. Visual grid: square or 3:4 |
| Separator |
Subtle line (light theme) or gap (dark theme). Not both |
| Filters |
Horizontal scroll pills OR top tabs for < 5 categories. Sheet/modal for complex filters |
| Search |
Sticky at top if list is > 20 items |
| Loading |
Skeleton shimmer matching item shape — not a centered spinner |
| Empty |
Illustration + message + CTA. Centered vertically |
| Pagination |
Infinite scroll with bottom loader for most apps. Explicit "Load more" for formal content |
Great: Smooth scroll performance (FlatList + getItemLayout), item animations on appear, pull-to-refresh with custom animation.
Profile / Settings
Structure: Avatar + info header → sections grouped by category → danger zone at bottom.
| Decision |
Guidance |
| Header |
Avatar (or initials fallback) + name + optional bio/subtitle |
| Sections |
Group related items. Use section headers to separate concerns |
| Navigation |
Chevron/arrow for items that navigate to a sub-screen |
| Toggles |
For instant-apply boolean settings. Not for actions |
| Danger zone |
Log out, delete account — visually distinct (red text or separated section) at the bottom |
| Edit mode |
Separate edit screen OR inline editing with clear save/cancel |
Great: Smooth avatar upload with crop, grouped sections with clear visual separation, confirmation for destructive actions.
Search
Structure: Search input (auto-focused) → recent/suggestions → results.
| Decision |
Guidance |
| Input |
Auto-focus on mount. Full-width. Clear button on right |
| State: empty |
Recent searches + trending/suggested (if applicable) |
| State: typing |
Real-time suggestions (debounced 300ms minimum) |
| State: results |
Same layout as the collection it searches |
| State: no results |
Friendly message + suggestions. Not just "No results" |
| Cancel |
Platform-correct: iOS shows "Cancel" text button. Android uses back gesture |
Great: Instant results feeling (optimistic UI), search highlighting in results, filter integration.
Onboarding / Walkthrough
Structure: 2-4 pages maximum → skip option → final CTA.
| Decision |
Guidance |
| Pages |
Maximum 4. Each communicates ONE benefit. Not features — benefits |
| Navigation |
Swipeable pages with dot indicator. "Next" and "Skip" always visible |
| Visuals |
Each page has ONE dominant visual (illustration, screenshot, or icon). Not walls of text |
| Final |
Clear CTA that enters the app. "Get Started" not "Done" |
| Skip |
Always available. Some users don't want onboarding |
| Re-entry |
Settings should have "Show onboarding" option |
Great: Subtle page transition animations, micro-interactions on illustrations, progress feels fast (never sluggish).
Modal / Bottom Sheet
Structure: Handle (for sheets) → title → content → actions.
| Decision |
Guidance |
| Type |
Bottom sheet for contextual options. Center modal for confirmations/alerts |
| Handle |
Gray pill indicator (4×36pt) at top of bottom sheets |
| Dismiss |
Swipe down + backdrop tap. Never trap the user |
| Content height |
Auto-height to content (max 85% screen). Scroll internally if needed |
| Actions |
Primary right/bottom. Destructive in red. Cancel on left |
| Backdrop |
rgba(0,0,0, 0.4–0.6) with blur if available |
Tab / Navigation Structure
| Pattern |
When to use |
| Bottom tabs (3-5) |
Primary navigation for most apps |
| Top tabs |
Sub-categories within a section (e.g., "All / Movies / Series") |
| Drawer |
Many sections (> 5), settings-heavy apps, enterprise |
| Stack-only |
Linear flows (onboarding, checkout), single-purpose apps |
| Tab + Stack |
Most common: tabs for sections, stack for detail/sub-flows |
Layout Decision Framework
When deciding HOW to structure a view, follow this decision tree:
Content Type → Layout Choice
Is the content a list of similar items?
├── YES → Are items visual (images/thumbnails)?
│ ├── YES → Grid (2-3 cols) OR horizontal scroll carousel
│ └── NO → Vertical list (FlatList)
└── NO → Is it a form?
├── YES → Vertical scroll, single column, generous spacing
└── NO → Is it mixed content (hero + details + actions)?
├── YES → ScrollView with sections
└── NO → Is it a dashboard with multiple data types?
├── YES → Sections with different component types
└── NO → Centered content (auth, empty states, confirmation)
Spacing Rules
| Context |
Horizontal padding |
Vertical spacing between sections |
Internal card padding |
| Standard screen |
16-20pt |
24-32pt |
12-16pt |
| Data-dense screen |
12-16pt |
16-20pt |
8-12pt |
| Immersive/media |
0pt (full-bleed) to 16pt |
16-24pt |
12-16pt |
| Form |
16-24pt |
16-24pt |
— |
Component Size Reference
| Element |
Minimum height |
Recommended |
| Touch target |
44pt (iOS) / 48dp (Android) |
48pt |
| Button |
44pt |
48-56pt |
| Input field |
44pt |
48-56pt |
| List item (text only) |
44pt |
56-72pt |
| List item (with avatar) |
56pt |
64-80pt |
| Tab bar |
49pt (iOS) / 56dp (Android) |
Platform default |
| Navigation header |
44pt (iOS) / 56dp (Android) |
Platform default |
| Card (compact) |
— |
120-160pt |
| Card (featured) |
— |
200-280pt |
Project Context — Detect Before Designing
Before proposing any changes, determine what kind of project you are working with:
New project (no existing screens or theme)
- Full creative freedom. Follow Workflow A from Theme Creation.
- Define a color system, type scale, and spacing unit before writing any component.
- Apply the Visual Aesthetics Guidelines without constraint.
Existing project (screens, components, or theme already present)
Run this diagnostic first:
- Inspect the theme/token system — check for a
colors.ts, theme.ts, tailwind.config, or equivalent. Understand the existing palette, surface layers, and typography scale.
- Inspect the existing screens — identify the current hierarchy (header, content, empty states, interactive elements).
- Evaluate impact ceiling — ask yourself: if I only work within the existing design system, will the changes be visually meaningful or just incremental noise?
If working within the existing system is enough (the theme has sufficient depth, the type scale has range, the spacing system is solid): proceed and apply the Visual Aesthetics Guidelines within those constraints.
If the existing system limits impact (flat color palette, no typographic hierarchy, uniform spacing, no surface layers): stop and ask the user:
"I've analyzed the current design system. To make a meaningful visual improvement, I'd need to [describe what's missing — e.g. add a display font, introduce surface elevation, extend the color palette]. Do you want me to:
A) Work strictly within what exists (smaller but safer changes)
B) Propose additions to the design system to unlock bolder improvements (I'll show you what I'd add before touching any code)"
Never silently extend the design system. Never silently stay within it if doing so produces only pixel-level changes. Make the trade-off visible to the user.
Impact check (applies to both cases)
Before finalizing any design proposal, verify:
If none of these are true, the work is not done. Incremental token swaps are not design decisions.
Technical baseline (always inspect first)
Before making code changes, inspect the project's runtime and styling baseline:
- App runtime — detect Expo vs framework-less React Native. Check
package.json, app.json/app.config.*, and the entry file.
- React Native version — note the RN version when available. Some styling capabilities are version-dependent.
- Architecture support — detect whether the project uses the New Architecture before relying on newer style props such as
boxShadow.
- Core UI libraries — check for
react-native-safe-area-context, react-native-reanimated, react-native-gesture-handler, expo-router / @react-navigation/*, expo-blur, and image libraries.
- Styling stack — detect whether the project uses
StyleSheet.create, NativeWind, styled-components, Restyle, or another established pattern.
If the project already has a clear stack and conventions, follow them. Do not introduce a new styling system or theming model unless the user explicitly wants that change.
React Native Platform Constraints
These are hard rules — not preferences. Violating them produces broken or incorrect UI.
Layout Engine
- All layout uses Flexbox. There is no CSS Grid, no
display: block, no float.
flexDirection defaults to column (NOT row like on the web).
alignItems defaults to stretch. alignContent defaults to flex-start.
flexShrink defaults to 0 (web default is 1).
- All dimensions are unitless density-independent pixels — never
px, em, rem, or vw/vh.
- Use
Dimensions.get('window') or useWindowDimensions() for screen-relative sizing.
- Percentage values work (
width: '50%') but require a parent with defined dimensions.
Gradients
- CSS
background: linear-gradient(...) does NOT work in React Native. It is silently ignored.
- Use
expo-linear-gradient (<LinearGradient>) or react-native-linear-gradient for all gradients.
- Pass colors as an array:
colors={['#000', '#333']}. Control direction with start and end props.
Shadows
- iOS: Use
shadowColor, shadowOffset, shadowOpacity, shadowRadius.
- Android: Use
elevation (integer). It also affects z-index stacking.
- There is no universally safe single cross-platform shadow property — handle iOS shadow props and Android
elevation explicitly unless the project already relies on a newer supported API.
- Modern React Native exposes
boxShadow, but it is tied to the New Architecture and newer platform support. Treat it as a version-gated enhancement, not a baseline assumption.
overflow: 'hidden' on Android clips shadows completely. Avoid it on shadow containers.
Images
- Static local images:
<Image source={require('./img/photo.png')} /> — dimensions are inferred automatically.
- Network images:
<Image source={{ uri: '...' }} style={{ width: 200, height: 200 }} /> — you must specify dimensions manually, or the image will not render.
- Provide
@2x and @3x variants for static images to target screen densities.
- Use
<ImageBackground> for background images, NOT background-image CSS.
- Modern RN supports per-corner radius props on
<Image>, but rounded-image behavior can still be inconsistent depending on platform, resize mode, and image type. If corners do not render correctly, wrap the image in a clipping container or use Android overlayColor when appropriate.
resizeMode values: cover, contain, stretch, repeat, center.
Color
- Supports: hex (
#fff, #ffffff), rgb(), rgba(), hsl(), hsla(), named CSS3 colors (lowercase only).
- Use
PlatformColor to reference system colors (adapts to dark/light mode automatically).
- Use
DynamicColorIOS to specify explicit light/dark color pairs on iOS.
- Use
useColorScheme() (from react-native) as the base hook to detect the current theme ('light' | 'dark' | null). This is the entry point for any manual dark/light theming.
- Prefer token-based color systems (a
colors.ts constant file, a theme context, or Tailwind semantic tokens) over hardcoded values.
Touch & Interaction
- Use
<Pressable> as the default touchable primitive — it supports pressed state via render prop.
<TouchableOpacity> is acceptable for simple opacity feedback.
- On Android,
<Pressable> with android_ripple provides Material Design ripple — use it.
- The touch area never extends past the parent view bounds — use
hitSlop to expand tap targets.
- Minimum tap target size: 44×44 points (Apple HIG) / 48×48dp (Material Design).
Blur & Visual Effects
- Use
expo-blur (<BlurView>) for frosted-glass effects — translucent modals, floating headers, tab bars with depth.
BlurView has a tint prop: 'light', 'dark', 'default', 'prominent' (iOS) and 'regular'/'prominent' (Android API 31+).
- On Android < API 31,
BlurView renders a semi-transparent fallback — always provide a solid backgroundColor as a graceful fallback.
- Do NOT simulate blur with opacity alone — it looks flat and does not match platform conventions.
Lists
- Use
<FlatList> for any list that could exceed the screen height — it virtualizes items and avoids memory issues.
- Use
<ScrollView> only for short, bounded content (forms, detail screens with a fixed number of items).
- Always provide
keyExtractor on <FlatList> — never rely on index as key for dynamic data.
- Provide
getItemLayout if all items have a fixed height — it dramatically improves scroll performance and jump-to-index.
- Design empty states and loading skeletons as first-class UI — a blank screen or spinner-only state is an unfinished design.
ListEmptyComponent has no parent height — flex: 1 inside it does nothing. To vertically center empty state content, use minHeight with Dimensions.get('window').height and justifyContent: 'center' instead.
Typography
- React Native does not support web fonts by default — use
expo-font or @expo-google-fonts/* to load custom fonts.
- Platform defaults: iOS uses San Francisco (SF Pro), Android uses Roboto. These are acceptable for body/UI text — they are familiar to users. Override them for display/brand purposes only.
lineHeight in RN is absolute (not a multiplier like CSS) — lineHeight: 24 means 24pt, not 1.5×.
letterSpacing is supported but has subtle platform differences.
- Avoid
fontWeight: 'bold' on custom fonts — specify the exact weight variant (fontFamily: 'Inter_700Bold').
Platform Differences
- Treat negative
margin on Android as unsafe. React Native still documents it as a known platform mismatch; prefer transforms, absolute positioning, or parent layout changes instead.
zIndex works but is less reliable on Android — prefer elevation for stacking.
position: 'static' only available with the New Architecture.
- Safe area insets differ by device — always use
<SafeAreaView> or useSafeAreaInsets() from react-native-safe-area-context.
- Keyboard behavior differs: use
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'}>.
Visual Aesthetics Guidelines
Reference Apps by Category
Study these apps for specific design qualities. When designing for a particular domain, reference the relevant category:
Media & Entertainment (Dark-first, immersive)
- Letterboxd — deep black surfaces, careful typographic hierarchy, film-poster imagery, muted accent colors
- Spotify — layered dark grays (not pure black), dominant art color extraction, generous spacing
- Netflix — full-bleed imagery, minimal chrome, red as the only accent, auto-playing heroes
- Apple Music — blurred album backgrounds, adaptive colors, clean segmented controls
Productivity & Utility
- Things 3 — radical whitespace, ultra-clean typography, color used sparingly for status only
- Notion — generous padding, clean card system, subdued iconography, type as the hero
- Linear — dark purple-black surfaces, vibrant status colors, excellent keyboard shortcuts UX
- Todoist — clear priority system through color, satisfying completion animations
Finance & Data
- Robinhood — minimal chrome, data as the hero, strong typographic scale, green/red only for gains/loss
- Revolut — premium dark theme, card-as-hero design, smooth transitions between sections
- Coinbase — clean data visualization, restrained color, clear hierarchy in complex data
Social & Communication
- Discord — comfortable dark theme for long sessions, clear hierarchy between channels/messages/servers
- Threads — minimal, content-first, generous whitespace, typography-driven
Health & Wellness
- Headspace — warm illustrations, rounded shapes, calming palette, clear progress tracking
- Strava — activity-centric, maps as heroes, motivational use of personal data
E-commerce
- GOAT/StockX — product-as-hero, clean detail views, clear pricing hierarchy
- Airbnb — map + list integration, excellent photo galleries, clear booking flow
Dark Theme Principles
- Never use pure
#000000 as a background — prefer #0D0D0D to #1C1C1E. Better yet, tint the base with your brand hue at very low saturation (e.g., for a teal accent: hsl(210, 25%, 5%) gives a blue-black with soul).
- Create depth through surface layers: background → card
…(truncated)
1---2name: react-native-design3description: Build, redesign, critique, refactor, or debug React Native UI with strong visual direction and platform-correct implementation. Handles mobile constraints (gradients, shadows, images, flexbox), diagnoses existing design systems before proposing changes, and adapts to the project's styling stack, including StyleSheet, NativeWind/Tailwind, styled-components, and Restyle. Use when creating or improving any React Native screen or component, translating web/Figma ideas to React Native, auditing an existing mobile UI, or fixing iOS/Android-specific styling and interaction issues. Also use when: creating a full theme from scratch, generating color palettes, designing specific views, improving existing color combinations, or making design decisions about layout, navigation, and component structure.4---56# react-native-design78This skill guides the creation of distinctive, production-grade React Native UI that avoids generic "AI slop" aesthetics and respects the hard constraints of the mobile platform. It acts as a **complete UX/UI replacement** — capable of generating color systems, designing screens from scratch, critiquing and improving existing UI, and making every design decision that a professional designer would make.910The user provides a screen, component, UI direction, app concept, or design problem. They may include context about the purpose, audience, target platform, existing styling approach, or preferred colors.1112---1314## Core Philosophy15161. **Every pixel is a decision.** Nothing should be accidental — not a color, not a spacing value, not a font choice.172. **Design is problem-solving, not decoration.** The UI must serve the user's task, not look impressive in a screenshot.183. **Platform correctness is non-negotiable.** Beautiful design that crashes or renders incorrectly is worthless.194. **Consistency compounds.** A simple system applied rigorously beats complex rules applied inconsistently.205. **Intentionality over trends.** A deliberate choice to be minimal is as powerful as a choice to be bold.2122---2324## Design Thinking — Expanded Framework2526Before touching any code, answer these questions (internally or by asking the user):2728### 1. Purpose & Audience2930- What problem does this app/screen solve?31- Who is the target user? (age, tech literacy, context of use — commuting? at home? at work?)32- What emotional response should the UI trigger? (trust, excitement, calm, urgency, delight)33- Will users spend seconds or minutes on this screen?3435### 2. Aesthetic Direction3637Commit to ONE personality. Do not default to "clean and modern" — that is a non-choice.3839| Aesthetic | Characteristics | When to use |40| ---------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------- |41| **Cinematic / Immersive** | Deep darks, rich imagery, dramatic typography, ambient lighting effects | Media, entertainment, streaming, photography |42| **Editorial / Magazine** | Strong typographic hierarchy, asymmetric layouts, generous whitespace, bold headings | Content-heavy, news, blogs, long-form reading |43| **Luxury / Refined** | Restrained palette, subtle animations, premium materials feel, serif fonts | Finance, premium services, fashion |44| **Brutalist / Raw** | High contrast, exposed structure, monospace type, no rounded corners | Developer tools, creative portfolios, avant-garde |45| **Playful / Friendly** | Rounded shapes, saturated colors, bouncy animations, illustration-heavy | Education, kids, social, gamified experiences |46| **Utilitarian / Data-dense** | Compact layouts, tables/grids, monospace numbers, minimal decoration | Dashboards, trading, analytics, productivity |47| **Organic / Calm** | Muted earth tones, soft gradients, breathing animations, natural imagery | Wellness, meditation, health, journaling |48| **Neo-brutalist / Bold** | Thick borders, offset shadows, bright primaries, visible grid | Creative tools, indie products, portfolios |4950### 3. Theme Preference5152- **Dark**: Depth, layers, glowing accents, contrast through luminosity53- **Light**: Whitespace, shadows for depth, color used sparingly54- **Both (dual)**: Requires a token system that maps semantic roles, not hardcoded values5556### 4. Differentiation5758- What is the ONE thing a user will notice and remember?59- What makes this different from the 10 closest competitors?6061CRITICAL: Intentionality beats intensity. A well-executed minimal design and a well-executed maximalist design are both excellent. A half-hearted attempt at either is not.6263---6465## Color System — Complete Theory & Generation6667This section enables creating professional color palettes from scratch, from user-provided colors, or improving existing ones.6869### Color Theory Fundamentals7071Every professional palette is built on color relationships:7273| Scheme | Definition | Character | Best for |74| ----------------------- | --------------------------------- | ---------------------------------------- | ------------------------------------------- |75| **Monochromatic** | One hue, multiple tints/shades | Elegant, cohesive, low cognitive load | Utility apps, dashboards, minimalist brands |76| **Analogous** | 2-3 adjacent hues on the wheel | Harmonious, natural, warm/cool bias | Lifestyle, wellness, organic brands |77| **Complementary** | Opposite hues (180°) | High energy, vibrant tension | CTAs, alerts, gaming, sports |78| **Split-complementary** | Base + two adjacent to complement | Vibrant but balanced, less harsh | Most apps — versatile and dynamic |79| **Triadic** | Three hues 120° apart | Balanced energy, colorful but controlled | Multi-category apps, social, creative tools |8081### Palette Generation Process8283**Starting from an app concept (no user colors):**84851. Identify the emotional tone → pick a dominant hue family:86 - Trust/stability → Blue (210°–240°)87 - Energy/passion → Red-Orange (0°–30°)88 - Growth/health → Green (120°–160°)89 - Creativity/luxury → Purple (270°–310°)90 - Warmth/optimism → Yellow-Orange (30°–60°)91 - Calm/nature → Teal-Cyan (170°–200°)92 - Sophistication/tech → Blue-Violet (240°–270°)93942. Choose a relationship scheme (split-complementary is the safest default)95963. Generate the full system using the token structure below9798**Starting from user-provided colors (1-3 colors):**991001. Identify the provided color(s) as HSL values1012. Determine their role: is it accent? background? brand mark?1023. Derive the missing roles:103 - If user gives **1 accent color**: build surfaces around it (dark: desaturate + darken for backgrounds; light: tint for surfaces)104 - If user gives **2 colors**: determine their relationship, fill remaining slots105 - If user gives **a brand palette**: respect the hierarchy, add functional colors (semantic states, surface layers)1061074. Generate tints/shades of the accent at these stops: `50, 100, 200, 300, 400, 500 (base), 600, 700, 800, 900, 950`108109**Improving an existing palette:**1101111. Read ALL color tokens in the project1122. Check for these common problems:113 - Accent too close to semantic colors (can't distinguish "success" from "primary")114 - Surface layers without enough contrast between steps (< 5% luminosity gap = invisible)115 - Text colors that don't meet WCAG AA (4.5:1 for body, 3:1 for large text)116 - Too many unique colors that don't relate to each other117 - Borders/strokes that create unintended halos against their backgrounds1183. Propose specific fixes with before/after hex values119120### Color Token Architecture — Mandatory Structure121122Every theme MUST have these semantic layers. Names can vary by project convention, but the roles must be present:123124```125SURFACES (background layers — establish depth)126├── base → absolute deepest background (dark: #070B11-ish, light: #F8FAFC-ish)127├── main → primary screen background128├── elevated → cards, modals, floating elements129├── overlay → scrim behind modals (semi-transparent)130└── interactive → hover/pressed states on surfaces131132ACCENT (brand color)133├── main → primary accent (buttons, links, active states)134├── container → filled surfaces with accent (CTAs, badges, selected states)135├── subtle → tinted surfaces (sidebar active item, selected card bg)136├── on-accent → text/icon color ON the accent fill137138TEXT (foreground hierarchy)139├── primary → highest contrast — titles, critical content140├── secondary → body text, descriptions141├── tertiary → muted — placeholders, metadata, timestamps142├── disabled → clearly inactive143└── on-color → text on colored surfaces (accent, semantic)144145BORDERS (stroke hierarchy)146├── default → card borders, dividers147├── subtle → barely visible separators148├── strong → focused inputs, active states149└── accent → accent-colored borders150151SEMANTIC (functional — MUST differ from accent)152├── success → main + surface + text153├── warning → main + surface + text154├── error → main + surface + text155└── info → main + surface + text156157COMPONENT-SPECIFIC (optional but recommended)158├── button → primary/secondary/ghost/danger states159├── input → default/focused/error fills and strokes160├── navigation → tab colors, active indicators161└── card → specific card backgrounds if they differ from general surfaces162```163164### Dark Theme Color Rules165166| Rule | Guidance |167| ----------------- | ----------------------------------------------------------------------------------------------------------------------- |168| Background base | NEVER pure `#000000`. Use `#050505`–`#121212`. Tint the black with your brand hue for warmth |169| Surface steps | Each layer 5-12% lighter. Minimum 4 layers. Test: put a card on the background — can you see the edge without a border? |170| Accent saturation | Increase saturation 10-20% vs light theme. Muted accents disappear on dark |171| Accent luminosity | The accent must be L≥50% in HSL to be readable against dark surfaces |172| Borders | Use `rgba(255,255,255, 0.08–0.15)` or accent at low opacity. Anything below 8% opacity is invisible |173| Text primary | `#F1F5F9` to `#FFFFFF` (never below L:90%) |174| Text secondary | `rgba(255,255,255, 0.55–0.70)` |175| Text tertiary | `rgba(255,255,255, 0.35–0.45)` |176| Shadows | Invisible. Don't waste code on them. Use border + elevation instead |177| Gradients | Subtle — used for depth on CTAs or hero sections, not decoration |178179### Light Theme Color Rules180181| Rule | Guidance |182| ----------------- | -------------------------------------------------------------------------------------- |183| Background base | `#F2F2F7` (iOS) or `#F5F5F5` (Material). Not flat white |184| Card surfaces | Pure `#FFFFFF` or near-white. Shadows create separation |185| Accent saturation | Can be lower than dark theme — the contrast is already there |186| Accent luminosity | Must be L≤45% for readable text on white backgrounds |187| Borders | `rgba(0,0,0, 0.06–0.12)` for subtle dividers |188| Text primary | `#1C1C1E` to `#000000` |189| Text secondary | `rgba(0,0,0, 0.55–0.65)` |190| Shadows | Essential for hierarchy — `shadowOpacity: 0.04–0.12` for cards, `0.15–0.25` for modals |191192### Dual Theme System (Light + Dark)193194When building both themes:1951961. **Never hardcode colors in components** — always reference semantic tokens1972. **Map by role, not by value** — `background.main` resolves to different hex per theme1983. **Implementation patterns** (detect what the project uses):199200```typescript201// styled-components: ThemeProvider swap202const darkTheme = { colors: { bg: { main: '#0C1219' }, ... } };203const lightTheme = { colors: { bg: { main: '#F8FAFC' }, ... } };204205// NativeWind: dark: prefix OR CSS variables206// className="bg-surface-main dark:bg-surface-main-dark"207208// Context-based: useTheme() hook returning current tokens209```2102114. **Test both themes** — every component must be verified against both palettes212213### Accessibility — Color Contrast Requirements214215| Element | Minimum ratio (WCAG AA) | Target ratio |216| ------------------------------ | ----------------------- | ------------ |217| Body text on background | 4.5:1 | 7:1 (AAA) |218| Large text (≥18px bold, ≥24px) | 3:1 | 4.5:1 |219| UI components (borders, icons) | 3:1 | 4.5:1 |220| Decorative/disabled | No requirement | — |221222**Quick contrast check formula** (for dark themes):223224- Text at `rgba(255,255,255, 0.87)` on `#1C1C1E` = ~12:1 ✓225- Text at `rgba(255,255,255, 0.60)` on `#1C1C1E` = ~8:1 ✓226- Text at `rgba(255,255,255, 0.38)` on `#1C1C1E` = ~5:1 ✓ (large text only)227228**For accents as text**: The accent color must have ≥4.5:1 against its surface. Teal `#2DD4BF` on `#0C1219` ≈ 9:1 ✓. But teal on `#253244` ≈ 5.5:1 — use with caution on elevated surfaces.229230---231232## Theme Creation — Step-by-Step Workflows233234### Workflow A: Create a Theme from Scratch (New App)235236When a user says "I'm building an app for X, create a theme":2372381. **Ask or infer** the app category, audience, and aesthetic direction2392. **Choose a dominant hue** based on the emotional tone (see table above)2403. **Select a color scheme** (default to split-complementary unless the app is clearly monochromatic)2414. **Generate the full token structure** following the Color Token Architecture2425. **Select fonts**:243 - Display/brand: distinctive, memorable (not Inter/Roboto/system default)244 - Body/UI: highly legible, with available weight variants245 - Use `@expo-google-fonts` for easy loading2466. **Define the type scale** (minimum: display, title, headline, body, caption, label)2477. **Define spacing** (4pt or 8pt base grid)2488. **Define border radius** (consistent set: none, sm, md, lg, full)2499. **Output**: Complete theme file + type definitions + font loading instructions250251### Workflow B: Improve an Existing Theme252253When a user says "improve my colors" or "the UI feels off":2542551. **Read all theme files** (colors, typography, spacing, components)2562. **Audit against the rules** in this skill:257 - Surface contrast steps sufficient?258 - Accent readable on all its surfaces?259 - Semantic colors distinct from accent?260 - Typography hierarchy has enough range? (min 3:1 ratio between smallest and largest)261 - Spacing consistent with a grid?2623. **Identify top 3 issues** — prioritize by visual impact2634. **Propose changes** with exact hex values, showing before → after2645. **Explain the reasoning** briefly (not pages of theory — just "this fixes X because Y")265266### Workflow C: Create a Theme from User Colors267268When a user provides specific colors:2692701. **Analyze the colors** — convert to HSL, identify hue family, saturation, luminosity2712. **Assign roles**: which is accent? which is surface? Let the most saturated/distinctive color be the accent2723. **Generate complementary colors** using the theory above2734. **Build the full surface stack** around the provided colors2745. **Verify contrast** of every text/surface combination2756. **Output**: Complete theme, noting which colors are user-provided vs generated276277### Workflow D: Design a Specific View278279When a user says "design a login screen" or "create a profile view":2802811. **Inspect existing theme and components** — work within what exists2822. **Select the appropriate screen pattern** from the catalog below2833. **Apply the theme tokens** — never introduce new colors not in the system2844. **Structure the layout** following the Layout Decision Framework2855. **Handle all states**: default, loading, error, empty, success2866. **Output**: Complete view code, styles, and types if applicable287288---289290## Screen Pattern Catalog291292Reference designs for common screens. Each pattern includes structure, key design decisions, and what separates good from great.293294### Authentication (Login / Register / Forgot Password)295296**Structure**: Centered form, minimal distraction, clear primary CTA, secondary links below.297298| Decision | Guidance |299| ------------- | ----------------------------------------------------------------------------------------- |300| Visual weight | The input fields and CTA should dominate — minimize logos and decoration |301| Background | Solid dark/light surface OR subtle gradient. Never busy imagery that competes with inputs |302| Inputs | Generous height (48-56pt), clear focus states, inline validation |303| CTA | Full-width, high contrast, immediate loading feedback |304| Social login | Secondary visual weight — below the primary form |305| Keyboard | Must not cover the active input. Use `KeyboardAvoidingView` + scroll |306| Error display | Inline per-field (red text below input) + optional toast for network errors |307308**Great**: Smooth keyboard transitions, immediate field validation, subtle brand personality through font/color choice, haptic on submit.309310### Home / Dashboard311312**Structure**: Scrollable surface with sections — greeting/status → primary content → secondary content.313314| Decision | Guidance |315| ----------------- | ------------------------------------------------------------------------------------------------- |316| Header | Personalized greeting OR key metric. Not generic "Welcome back" |317| Content hierarchy | What does the user want MOST when they open the app? That goes first |318| Cards vs List | Cards for visual/browseable content (media, products). Lists for scannable data (tasks, messages) |319| Empty first-use | Dedicated onboarding prompt, not just "No items yet" |320| Pull-to-refresh | Expected if data is remote |321| Floating action | Only if there's ONE dominant creation action |322323**Great**: Content-first (data visible without scrolling), progressive disclosure, personalized ordering.324325### Detail View (Item/Product/Content)326327**Structure**: Hero image/visual → title + metadata → body content → actions.328329| Decision | Guidance |330| --------------- | ----------------------------------------------------------------------- |331| Hero | Full-width image or large visual. Aspect ratio 16:9 or 3:4 for media |332| Scroll behavior | Image collapses on scroll, title becomes the header (parallax optional) |333| Metadata | Compact row: date, category, rating — secondary text weight |334| Actions | Sticky bottom bar OR contextual buttons within content |335| Back navigation | Always visible — overlay on hero image if present |336337**Great**: Smooth scroll-linked transitions, image loading with shimmer/blur-up, rich metadata without clutter.338339### List / Collection340341**Structure**: Optional filters/tabs at top → scrollable list → empty state.342343| Decision | Guidance |344| ----------- | ------------------------------------------------------------------------------------------ |345| Layout | Vertical list for text-heavy items. Grid (2-3 columns) for visual items (photos, products) |346| Item height | Consistent per type. Text list: 64-88pt. Visual grid: square or 3:4 |347| Separator | Subtle line (light theme) or gap (dark theme). Not both |348| Filters | Horizontal scroll pills OR top tabs for < 5 categories. Sheet/modal for complex filters |349| Search | Sticky at top if list is > 20 items |350| Loading | Skeleton shimmer matching item shape — not a centered spinner |351| Empty | Illustration + message + CTA. Centered vertically |352| Pagination | Infinite scroll with bottom loader for most apps. Explicit "Load more" for formal content |353354**Great**: Smooth scroll performance (FlatList + getItemLayout), item animations on appear, pull-to-refresh with custom animation.355356### Profile / Settings357358**Structure**: Avatar + info header → sections grouped by category → danger zone at bottom.359360| Decision | Guidance |361| ----------- | ----------------------------------------------------------------------------------------- |362| Header | Avatar (or initials fallback) + name + optional bio/subtitle |363| Sections | Group related items. Use section headers to separate concerns |364| Navigation | Chevron/arrow for items that navigate to a sub-screen |365| Toggles | For instant-apply boolean settings. Not for actions |366| Danger zone | Log out, delete account — visually distinct (red text or separated section) at the bottom |367| Edit mode | Separate edit screen OR inline editing with clear save/cancel |368369**Great**: Smooth avatar upload with crop, grouped sections with clear visual separation, confirmation for destructive actions.370371### Search372373**Structure**: Search input (auto-focused) → recent/suggestions → results.374375| Decision | Guidance |376| ----------------- | --------------------------------------------------------------------------- |377| Input | Auto-focus on mount. Full-width. Clear button on right |378| State: empty | Recent searches + trending/suggested (if applicable) |379| State: typing | Real-time suggestions (debounced 300ms minimum) |380| State: results | Same layout as the collection it searches |381| State: no results | Friendly message + suggestions. Not just "No results" |382| Cancel | Platform-correct: iOS shows "Cancel" text button. Android uses back gesture |383384**Great**: Instant results feeling (optimistic UI), search highlighting in results, filter integration.385386### Onboarding / Walkthrough387388**Structure**: 2-4 pages maximum → skip option → final CTA.389390| Decision | Guidance |391| ---------- | ---------------------------------------------------------------------------------------- |392| Pages | Maximum 4. Each communicates ONE benefit. Not features — benefits |393| Navigation | Swipeable pages with dot indicator. "Next" and "Skip" always visible |394| Visuals | Each page has ONE dominant visual (illustration, screenshot, or icon). Not walls of text |395| Final | Clear CTA that enters the app. "Get Started" not "Done" |396| Skip | Always available. Some users don't want onboarding |397| Re-entry | Settings should have "Show onboarding" option |398399**Great**: Subtle page transition animations, micro-interactions on illustrations, progress feels fast (never sluggish).400401### Modal / Bottom Sheet402403**Structure**: Handle (for sheets) → title → content → actions.404405| Decision | Guidance |406| -------------- | -------------------------------------------------------------------------- |407| Type | Bottom sheet for contextual options. Center modal for confirmations/alerts |408| Handle | Gray pill indicator (4×36pt) at top of bottom sheets |409| Dismiss | Swipe down + backdrop tap. Never trap the user |410| Content height | Auto-height to content (max 85% screen). Scroll internally if needed |411| Actions | Primary right/bottom. Destructive in red. Cancel on left |412| Backdrop | `rgba(0,0,0, 0.4–0.6)` with blur if available |413414### Tab / Navigation Structure415416| Pattern | When to use |417| ----------------- | --------------------------------------------------------------- |418| Bottom tabs (3-5) | Primary navigation for most apps |419| Top tabs | Sub-categories within a section (e.g., "All / Movies / Series") |420| Drawer | Many sections (> 5), settings-heavy apps, enterprise |421| Stack-only | Linear flows (onboarding, checkout), single-purpose apps |422| Tab + Stack | Most common: tabs for sections, stack for detail/sub-flows |423424---425426## Layout Decision Framework427428When deciding HOW to structure a view, follow this decision tree:429430### Content Type → Layout Choice431432```433Is the content a list of similar items?434├── YES → Are items visual (images/thumbnails)?435│ ├── YES → Grid (2-3 cols) OR horizontal scroll carousel436│ └── NO → Vertical list (FlatList)437└── NO → Is it a form?438 ├── YES → Vertical scroll, single column, generous spacing439 └── NO → Is it mixed content (hero + details + actions)?440 ├── YES → ScrollView with sections441 └── NO → Is it a dashboard with multiple data types?442 ├── YES → Sections with different component types443 └── NO → Centered content (auth, empty states, confirmation)444```445446### Spacing Rules447448| Context | Horizontal padding | Vertical spacing between sections | Internal card padding |449| ----------------- | ------------------------ | --------------------------------- | --------------------- |450| Standard screen | 16-20pt | 24-32pt | 12-16pt |451| Data-dense screen | 12-16pt | 16-20pt | 8-12pt |452| Immersive/media | 0pt (full-bleed) to 16pt | 16-24pt | 12-16pt |453| Form | 16-24pt | 16-24pt | — |454455### Component Size Reference456457| Element | Minimum height | Recommended |458| ----------------------- | --------------------------- | ---------------- |459| Touch target | 44pt (iOS) / 48dp (Android) | 48pt |460| Button | 44pt | 48-56pt |461| Input field | 44pt | 48-56pt |462| List item (text only) | 44pt | 56-72pt |463| List item (with avatar) | 56pt | 64-80pt |464| Tab bar | 49pt (iOS) / 56dp (Android) | Platform default |465| Navigation header | 44pt (iOS) / 56dp (Android) | Platform default |466| Card (compact) | — | 120-160pt |467| Card (featured) | — | 200-280pt |468469---470471## Project Context — Detect Before Designing472473Before proposing any changes, determine what kind of project you are working with:474475### New project (no existing screens or theme)476477- Full creative freedom. Follow **Workflow A** from Theme Creation.478- Define a color system, type scale, and spacing unit before writing any component.479- Apply the Visual Aesthetics Guidelines without constraint.480481### Existing project (screens, components, or theme already present)482483Run this diagnostic first:4844851. **Inspect the theme/token system** — check for a `colors.ts`, `theme.ts`, `tailwind.config`, or equivalent. Understand the existing palette, surface layers, and typography scale.4862. **Inspect the existing screens** — identify the current hierarchy (header, content, empty states, interactive elements).4873. **Evaluate impact ceiling** — ask yourself: _if I only work within the existing design system, will the changes be visually meaningful or just incremental noise?_488489**If working within the existing system is enough** (the theme has sufficient depth, the type scale has range, the spacing system is solid): proceed and apply the Visual Aesthetics Guidelines within those constraints.490491**If the existing system limits impact** (flat color palette, no typographic hierarchy, uniform spacing, no surface layers): **stop and ask the user**:492493> "I've analyzed the current design system. To make a meaningful visual improvement, I'd need to [describe what's missing — e.g. add a display font, introduce surface elevation, extend the color palette]. Do you want me to:494> A) Work strictly within what exists (smaller but safer changes)495> B) Propose additions to the design system to unlock bolder improvements (I'll show you what I'd add before touching any code)"496497Never silently extend the design system. Never silently stay within it if doing so produces only pixel-level changes. Make the trade-off visible to the user.498499### Impact check (applies to both cases)500501Before finalizing any design proposal, verify:502503- [ ] Has the **typographic hierarchy** changed? (sizes, weights, or scale — not just tokens)504- [ ] Has the **layout structure** changed? (not just padding values — actual arrangement of elements)505- [ ] Is there at least one decision that the user will **notice immediately** on first look?506507If none of these are true, the work is not done. Incremental token swaps are not design decisions.508509### Technical baseline (always inspect first)510511Before making code changes, inspect the project's runtime and styling baseline:5125131. **App runtime** — detect Expo vs framework-less React Native. Check `package.json`, `app.json`/`app.config.*`, and the entry file.5142. **React Native version** — note the RN version when available. Some styling capabilities are version-dependent.5153. **Architecture support** — detect whether the project uses the New Architecture before relying on newer style props such as `boxShadow`.5164. **Core UI libraries** — check for `react-native-safe-area-context`, `react-native-reanimated`, `react-native-gesture-handler`, `expo-router` / `@react-navigation/*`, `expo-blur`, and image libraries.5175. **Styling stack** — detect whether the project uses `StyleSheet.create`, NativeWind, styled-components, Restyle, or another established pattern.518519If the project already has a clear stack and conventions, follow them. Do not introduce a new styling system or theming model unless the user explicitly wants that change.520521---522523## React Native Platform Constraints524525These are hard rules — not preferences. Violating them produces broken or incorrect UI.526527### Layout Engine528529- All layout uses **Flexbox**. There is no CSS Grid, no `display: block`, no `float`.530- `flexDirection` defaults to `column` (NOT `row` like on the web).531- `alignItems` defaults to `stretch`. `alignContent` defaults to `flex-start`.532- `flexShrink` defaults to `0` (web default is `1`).533- All dimensions are **unitless density-independent pixels** — never `px`, `em`, `rem`, or `vw/vh`.534- Use `Dimensions.get('window')` or `useWindowDimensions()` for screen-relative sizing.535- Percentage values work (`width: '50%'`) but require a parent with defined dimensions.536537### Gradients538539- **CSS `background: linear-gradient(...)` does NOT work in React Native.** It is silently ignored.540- Use `expo-linear-gradient` (`<LinearGradient>`) or `react-native-linear-gradient` for all gradients.541- Pass colors as an array: `colors={['#000', '#333']}`. Control direction with `start` and `end` props.542543### Shadows544545- **iOS**: Use `shadowColor`, `shadowOffset`, `shadowOpacity`, `shadowRadius`.546- **Android**: Use `elevation` (integer). It also affects z-index stacking.547- There is no universally safe single cross-platform shadow property — handle iOS shadow props and Android `elevation` explicitly unless the project already relies on a newer supported API.548- Modern React Native exposes `boxShadow`, but it is tied to the New Architecture and newer platform support. Treat it as a version-gated enhancement, not a baseline assumption.549- `overflow: 'hidden'` on Android clips shadows completely. Avoid it on shadow containers.550551### Images552553- Static local images: `<Image source={require('./img/photo.png')} />` — dimensions are inferred automatically.554- Network images: `<Image source={{ uri: '...' }} style={{ width: 200, height: 200 }} />` — **you must specify dimensions manually**, or the image will not render.555- Provide `@2x` and `@3x` variants for static images to target screen densities.556- Use `<ImageBackground>` for background images, NOT `background-image` CSS.557- Modern RN supports per-corner radius props on `<Image>`, but rounded-image behavior can still be inconsistent depending on platform, resize mode, and image type. If corners do not render correctly, wrap the image in a clipping container or use Android `overlayColor` when appropriate.558- `resizeMode` values: `cover`, `contain`, `stretch`, `repeat`, `center`.559560### Color561562- Supports: hex (`#fff`, `#ffffff`), `rgb()`, `rgba()`, `hsl()`, `hsla()`, named CSS3 colors (lowercase only).563- Use `PlatformColor` to reference system colors (adapts to dark/light mode automatically).564- Use `DynamicColorIOS` to specify explicit light/dark color pairs on iOS.565- Use `useColorScheme()` (from `react-native`) as the base hook to detect the current theme (`'light'` | `'dark'` | `null`). This is the entry point for any manual dark/light theming.566- Prefer token-based color systems (a `colors.ts` constant file, a theme context, or Tailwind semantic tokens) over hardcoded values.567568### Touch & Interaction569570- Use `<Pressable>` as the default touchable primitive — it supports `pressed` state via render prop.571- `<TouchableOpacity>` is acceptable for simple opacity feedback.572- On Android, `<Pressable>` with `android_ripple` provides Material Design ripple — use it.573- The touch area **never extends past the parent view bounds** — use `hitSlop` to expand tap targets.574- Minimum tap target size: **44×44 points** (Apple HIG) / **48×48dp** (Material Design).575576### Blur & Visual Effects577578- Use `expo-blur` (`<BlurView>`) for frosted-glass effects — translucent modals, floating headers, tab bars with depth.579- `BlurView` has a `tint` prop: `'light'`, `'dark'`, `'default'`, `'prominent'` (iOS) and `'regular'`/`'prominent'` (Android API 31+).580- On Android < API 31, `BlurView` renders a semi-transparent fallback — always provide a solid `backgroundColor` as a graceful fallback.581- Do NOT simulate blur with opacity alone — it looks flat and does not match platform conventions.582583### Lists584585- Use `<FlatList>` for any list that could exceed the screen height — it virtualizes items and avoids memory issues.586- Use `<ScrollView>` only for short, bounded content (forms, detail screens with a fixed number of items).587- Always provide `keyExtractor` on `<FlatList>` — never rely on index as key for dynamic data.588- Provide `getItemLayout` if all items have a fixed height — it dramatically improves scroll performance and jump-to-index.589- Design empty states and loading skeletons as first-class UI — a blank screen or spinner-only state is an unfinished design.590- **`ListEmptyComponent` has no parent height** — `flex: 1` inside it does nothing. To vertically center empty state content, use `minHeight` with `Dimensions.get('window').height` and `justifyContent: 'center'` instead.591592### Typography593594- React Native does not support web fonts by default — use `expo-font` or `@expo-google-fonts/*` to load custom fonts.595- Platform defaults: iOS uses San Francisco (SF Pro), Android uses Roboto. These are acceptable for body/UI text — they are familiar to users. Override them for display/brand purposes only.596- `lineHeight` in RN is absolute (not a multiplier like CSS) — `lineHeight: 24` means 24pt, not 1.5×.597- `letterSpacing` is supported but has subtle platform differences.598- Avoid `fontWeight: 'bold'` on custom fonts — specify the exact weight variant (`fontFamily: 'Inter_700Bold'`).599600### Platform Differences601602- Treat negative `margin` on Android as unsafe. React Native still documents it as a known platform mismatch; prefer transforms, absolute positioning, or parent layout changes instead.603- `zIndex` works but is less reliable on Android — prefer `elevation` for stacking.604- `position: 'static'` only available with the New Architecture.605- Safe area insets differ by device — always use `<SafeAreaView>` or `useSafeAreaInsets()` from `react-native-safe-area-context`.606- Keyboard behavior differs: use `<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : 'height'}>`.607608---609610## Visual Aesthetics Guidelines611612### Reference Apps by Category613614Study these apps for specific design qualities. When designing for a particular domain, reference the relevant category:615616**Media & Entertainment** (Dark-first, immersive)617618- **Letterboxd** — deep black surfaces, careful typographic hierarchy, film-poster imagery, muted accent colors619- **Spotify** — layered dark grays (not pure black), dominant art color extraction, generous spacing620- **Netflix** — full-bleed imagery, minimal chrome, red as the only accent, auto-playing heroes621- **Apple Music** — blurred album backgrounds, adaptive colors, clean segmented controls622623**Productivity & Utility**624625- **Things 3** — radical whitespace, ultra-clean typography, color used sparingly for status only626- **Notion** — generous padding, clean card system, subdued iconography, type as the hero627- **Linear** — dark purple-black surfaces, vibrant status colors, excellent keyboard shortcuts UX628- **Todoist** — clear priority system through color, satisfying completion animations629630**Finance & Data**631632- **Robinhood** — minimal chrome, data as the hero, strong typographic scale, green/red only for gains/loss633- **Revolut** — premium dark theme, card-as-hero design, smooth transitions between sections634- **Coinbase** — clean data visualization, restrained color, clear hierarchy in complex data635636**Social & Communication**637638- **Discord** — comfortable dark theme for long sessions, clear hierarchy between channels/messages/servers639- **Threads** — minimal, content-first, generous whitespace, typography-driven640641**Health & Wellness**642643- **Headspace** — warm illustrations, rounded shapes, calming palette, clear progress tracking644- **Strava** — activity-centric, maps as heroes, motivational use of personal data645646**E-commerce**647648- **GOAT/StockX** — product-as-hero, clean detail views, clear pricing hierarchy649- **Airbnb** — map + list integration, excellent photo galleries, clear booking flow650651### Dark Theme Principles652653- Never use pure `#000000` as a background — prefer `#0D0D0D` to `#1C1C1E`. Better yet, tint the base with your brand hue at very low saturation (e.g., for a teal accent: `hsl(210, 25%, 5%)` gives a blue-black with soul).654- Create depth through **surface layers**: background → card 655656…(truncated)