← 返回
开发者工具 中文

Expor Native UI

Build beautiful native iOS/Android apps with Expo Router. Covers route structure, native tabs, animations, blur effects, liquid glass, SF Symbols, and platform patterns.
使用 Expo Router 构建精美的原生 iOS/Android 应用。涵盖路由结构、原生标签页、动画、模糊效果、液态玻璃效果、SF 符号和平台模式。
wpank wpank 来源
开发者工具 clawhub v1.0.0 1 版本 99896.4 Key: 无需
★ 0
Stars
📥 1,928
下载
💾 41
安装
1
版本
#latest

概述

Expo Native UI

Build production-quality native mobile apps with Expo Router following Apple Human Interface Guidelines and modern React Native patterns.

Installation

OpenClaw / Moltbot / Clawbot

npx clawhub@latest install expo-native-ui

WHAT This Skill Does

Guides implementation of native mobile apps using Expo Router with:

  • File-based routing with native navigation stacks
  • Native tab bars (NativeTabs) and iOS 26 features
  • SF Symbols integration via expo-symbols
  • Blur effects (expo-blur) and liquid glass (expo-glass-effect)
  • Reanimated animations and gesture handling
  • Native controls: Switch, Slider, SegmentedControl, DateTimePicker

WHEN To Use

  • Building a new Expo Router app
  • Adding native tab navigation
  • Implementing iOS-style blur or liquid glass effects
  • Creating smooth animations with entering/exiting transitions
  • Integrating SF Symbols for icons
  • Setting up route structure with groups and dynamic routes

KEYWORDS

expo router, react native, native tabs, sf symbols, expo blur, liquid glass, reanimated, ios, android, mobile app, navigation stack, form sheet, modal, context menu, link preview

References

Consult these resources for detailed implementation:

ReferencePurpose
--------------------
references/route-structure.mdRoute conventions, dynamic routes, groups, query params
references/tabs.mdNativeTabs, migration from JS tabs, iOS 26 features
references/icons.mdSF Symbols with expo-symbols, animations, weights
references/controls.mdNative iOS controls: Switch, Slider, DateTimePicker, Picker
references/visual-effects.mdBlur effects and liquid glass
references/animations.mdReanimated: entering, exiting, layout, scroll-driven
references/search.mdSearch bar integration, useSearch hook, filtering
references/gradients.mdCSS gradients via experimental_backgroundImage
references/media.mdCamera, audio, video, file saving
references/storage.mdSQLite, AsyncStorage, SecureStore
references/webgpu-three.mdWebGPU, Three.js for 3D graphics
references/toolbar-and-headers.mdStack headers, toolbar customization (iOS)

Core Principles

Running the App

Try Expo Go first before creating custom builds:

npx expo start  # Scan QR with Expo Go

Custom builds (npx expo run:ios) only needed for:

  • Local Expo modules (custom native code in modules/)
  • Apple targets (widgets, app clips via @bacons/apple-targets)
  • Third-party native modules not in Expo Go

Code Style

  • Kebab-case file names: comment-card.tsx
  • Path aliases in tsconfig over relative imports
  • Never co-locate components/utilities in app/ directory
  • Always ensure a route matches "/" (may be in a group)
  • Escape nested backticks carefully in strings

Library Preferences

UseInstead Of
-----------------
expo-audioexpo-av
expo-videoexpo-av
expo-symbols@expo/vector-icons
react-native-safe-area-contextRN SafeAreaView
process.env.EXPO_OSPlatform.OS
React.useReact.useContext
expo-imageintrinsic img element
expo-glass-effectcustom blur views

Responsiveness

// Always wrap root in ScrollView with automatic insets
<ScrollView contentInsetAdjustmentBehavior="automatic">
  {children}
</ScrollView>

// Use useWindowDimensions, not Dimensions.get()
const { width, height } = useWindowDimensions();

// Flexbox over Dimensions API
<View style={{ flex: 1, flexDirection: 'row', gap: 16 }} />

Navigation Patterns

Link with Preview and Context Menu

import { Link } from 'expo-router';

<Link href="/settings">
  <Link.Trigger>
    <Pressable><Card /></Pressable>
  </Link.Trigger>
  <Link.Preview />
  <Link.Menu>
    <Link.MenuAction title="Share" icon="square.and.arrow.up" onPress={handleShare} />
    <Link.MenuAction title="Delete" icon="trash" destructive onPress={handleDelete} />
  </Link.Menu>
</Link>

Form Sheet Modal

// In _layout.tsx
<Stack.Screen
  name="sheet"
  options={{
    presentation: "formSheet",
    sheetGrabberVisible: true,
    sheetAllowedDetents: [0.5, 1.0],
    contentStyle: { backgroundColor: "transparent" }, // Liquid glass on iOS 26+
  }}
/>

Native Tabs Structure

app/
  _layout.tsx — <NativeTabs />
  (index,search)/
    _layout.tsx — <Stack />
    index.tsx
    search.tsx
// app/_layout.tsx
import { NativeTabs, Icon, Label } from "expo-router/unstable-native-tabs";

export default function Layout() {
  return (
    <NativeTabs>
      <NativeTabs.Trigger name="(index)">
        <Icon sf="list.dash" />
        <Label>Items</Label>
      </NativeTabs.Trigger>
      <NativeTabs.Trigger name="(search)" role="search" />
    </NativeTabs>
  );
}

Styling Guidelines

  • Flex gap over margin/padding where possible
  • borderCurve: 'continuous' for rounded corners (not capsules)
  • boxShadow style prop, never legacy RN shadow/elevation
  • Stack title instead of custom text elements for page headers
  • Inline styles, not StyleSheet.create unless reusing
  • fontVariant: 'tabular-nums' for numeric counters
  • selectable prop on Text displaying copiable data
// Shadow example
<View style={{ boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)" }} />

// Continuous border curve
<View style={{ borderRadius: 12, borderCurve: 'continuous' }} />

Behavior Patterns

  • Haptics: Use expo-haptics conditionally on iOS
  • Search bar: Prefer headerSearchBarOptions in Stack.Screen
  • Selectable text: Add selectable prop to important data
  • Format large numbers: 1.4M, 38k instead of 1,400,000
  • Never use intrinsic elements (img, div) outside DOM components

NEVER Do

  1. NEVER use legacy modules: Picker, WebView, SafeAreaView from react-native, AsyncStorage (old), expo-permissions
  2. NEVER use Dimensions.get() — always useWindowDimensions
  3. NEVER co-locate components in the app/ directory
  4. NEVER use Platform.OS — use process.env.EXPO_OS
  5. NEVER use legacy shadow styles — use CSS boxShadow
  6. NEVER start with custom builds — try Expo Go first
  7. NEVER use StyleSheet.create for one-time styles
  8. NEVER use @expo/vector-icons — use expo-symbols

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 21:17 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,426
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 181,469
design-media

Tailwind Design System

wpank
使用 CVA 构建可扩展、可主题化的 Tailwind CSS 组件库,支持变体、复合组件、设计令牌、暗黑模式及响应式网格。
★ 8 📥 6,116