• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdevelopment

expo-native-ui

プラグイン
expo
ライセンス
MIT
ソース
GitHub で見る ↗
説明

フレームワーク(オープンソースソフトウェア)。Expo で美しく、ネイティブアプリのような見た目の画面を構築できます。Apple の Human Interface Guidelines(Appleが定めた設計指針)に準拠したスタイル、意味を持つ色、ネイティブコントロール、SF シンボル(Apple の統一アイコン集)、メディア、アニメーション、ビジュアルエフェクト、グラデーション、データ保存、レスポンシブレイアウト(画面サイズに応じた自動調整)に対応しています。ルーティング(ページ間の移動先指定)とナビゲーション(画面遷移)については、expo-router スキルを使用してください。

原文を表示

Framework (OSS). Build beautiful, native-feeling Expo screens. Covers Apple HIG styling, semantic colors, native controls, SF Symbols, media, animations, visual effects, gradients, storage, and responsive layout. For routing and navigation, use the expo-router skill.

ユースケース
  • Expoで美しいネイティブアプリ風の画面を構築
  • Apple設計指針に準拠したスタイルを適用
  • アニメーションやビジュアルエフェクトを実装
  • レスポンシブレイアウトで複数画面サイズに対応
本文(日本語訳)

Expo ネイティブUI ガイドライン

ルート、リンク、スタック、タブ、モーダル、シート、ヘッダーについては expo-router スキルを使用してください。

UIコンポーネントを選ぶ前に、まず expo-ui を確認してください。 @expo/ui はネイティブな代替コンポーネント(BottomSheet、Button、Picker、Slider、Menu、Section、Switch、SegmentedControl など)を提供し、iOS では実際の SwiftUI として、Android では Jetpack Compose(Android の UI構築フレームワーク)として描画されます。SDK 56 以降の Expo Go で利用でき、カスタムビルドは不要です。expo-ui スキルを読み込んで、React Native 組み込みやコミュニティライブラリに頼る前に適切なコンポーネントを見つけてください。このスキル(expo-native-ui)は Expo Router のナビゲーション、レイアウト、スタイリング、アニメーションなど、周辺の構造をカバーしています。

参考資料

必要に応じてこれらの資料を参照してください:

references/
  animations.md          Reanimated: 入場・退場・レイアウト・スクロール連動・ジェスチャーアニメーション
  controls.md            iOS ネイティブ: Switch、Slider、SegmentedControl、DateTimePicker、Picker
  gradients.md           CSS グラデーション(experimental_backgroundImage / New Arch のみ)
  icons.md               SF Symbols(expo-image で sf: ソース指定)、名前、アニメーション、太さ
  media.md               カメラ、音声、ビデオ、ファイル保存
  storage.md             SQLite、AsyncStorage、SecureStore
  visual-effects.md      ブラー(expo-blur)とガラス効果(expo-glass-effect)
  webgpu-three.md        3D グラフィックス、ゲーム、WebGPU と Three.js を使った GPU ビジュアライゼーション

アプリの実行

重要: カスタムビルドを作成する前に、必ず Expo Go で試してください。

ほとんどの Expo アプリはカスタムネイティブコードなしに Expo Go で動作します。npx expo run:ios または npx expo run:android を実行する前に:

  1. Expo Go から始める: npx expo start を実行し、Expo Go で QR コードをスキャンしてください
  2. 機能が動くか確認する: Expo Go でアプリを徹底的にテストしてください
  3. 必要な場合のみカスタムビルドを作成してください(以下を参照)

カスタムビルドが必要な場合

次を使用する場合のみ npx expo run:ios/android または eas build が必要です:

  • ローカル Expo モジュール(modules/ にあるカスタムネイティブコード)
  • Apple ターゲット(@bacons/apple-targets でウィジェット、アプリクリップ、拡張機能など)
  • Expo Go に含まれないサードパーティ製ネイティブモジュール
  • app.json では表現できないカスタムネイティブ設定

Expo Go が動く場合

Expo Go はすぐに使えるたくさんの機能をサポートしています:

  • すべての expo-* パッケージ(カメラ、位置情報、通知など)
  • Expo Router ナビゲーション
  • ほとんどのUI ライブラリ(reanimated、gesture handler など)
  • プッシュ通知、ディープリンクなど

迷ったら、まず Expo Go で試してください。 カスタムビルドは複雑性が増し、反復が遅くなり、Xcode/Android Studio の設定が必要です。

コードスタイル

  • 終わらない文字列に注意してください。ネストされたバッククォートはエスケープし、引用符のエスケープを忘れないでください
  • ファイルの上部に常にインポート文を記述してください
  • ファイル名は常にケバブケース(単語をハイフンでつなぐ記法)で記述してください。例: comment-card.tsx
  • ファイル名に特殊文字を使用しないでください
  • tsconfig.json をパスエイリアスで設定し、相対パスよりエイリアスを使用してリファクタリングに備えてください

ライブラリの優先度

  • シート、ピッカー、スライダー、トグル、メニュー、グループ化されたフォームセクションについては、React Native 組み込みやコミュニティライブラリを使う前に @expo/ui(expo-ui スキルを参照)を使用してください。ネイティブ SwiftUI/Compose として描画され、SDK 56+ の Expo Go で動作します。グループ化・設定画面のような行(短い、固定長)には @expo/ui の List + ListItem を使用してください。大きさや長さが不確定なスクローリストリスト(フィード、検索結果、カタログ)には FlatList または FlashList を使用してください。@expo/ui の List は仮想化(仮想スクロール)に対応していません
  • React Native から削除されたモジュール(Picker、WebView、SafeAreaView、AsyncStorage など)を使用しないでください
  • レガシーな expo-permissions を使用しないでください
  • expo-av ではなく expo-audio を使用してください
  • expo-av ではなく expo-video を使用してください
  • SF Symbols には expo-symbols や @expo/vector-icons ではなく、expo-image に source="sf:name" を指定して使用してください
  • React Native の SafeAreaView ではなく react-native-safe-area-context を使用してください
  • Platform.OS ではなく process.env.EXPO_OS を使用してください
  • React.useContext ではなく React.use を使用してください
  • 組み込み要素 img ではなく expo-image の Image コンポーネントを使用してください
  • ガラス効果のバックドロップには expo-glass-effect を使用してください
  • ネイティブセマンティックカラー(ライト/ダークモード自動対応)には、生の PlatformColor ではなく expo-router の Color を使用してください
  • SDK 56+ では、@react-navigation/* から直接インポートしないでください。代わりに expo-router/react-navigation を使用してください(@react-navigation/native、/core、/elements、/routers をカバーしています)

レスポンシブ対応

  • ルートコンポーネントを常にスクロールビューでラップしてレスポンシブ対応させてください
  • <SafeAreaView> の代わりに <ScrollView contentInsetAdjustmentBehavior="automatic" /> を使用してスマートなセーフエリア制御を行ってください
  • contentInsetAdjustmentBehavior="automatic" は FlatList と SectionList にも適用してください
  • Dimensions API ではなくフレックスボックスを使用してください
  • 画面サイズを測定するには Dimensions.get() ではなく useWindowDimensions を常に優先してください

動作

  • iOS でハプティクス(振動フィードバック)を条件付きで使用して、より快適な体験を作成してください
  • React Native の <Switch /> や @react-native-community/datetimepicker など、ハプティクス機能がビルトインされたビューを使用してください
  • ルートが Stack に属する場合、最初の子要素はほぼ常に contentInsetAdjustmentBehavior="automatic" を設定した ScrollView である必要があります
  • ページに ScrollView を追加する場合、ほぼ常にルートコンポーネント内の最初のコンポーネントにしてください
  • コピー可能なデータを含むテキストには <Text selectable /> プロップを使用してください
  • 1.4M や 38k などの大きい数字のフォーマットを検討してください
  • WebView や Expo DOM コンポーネント内でない限り、img や div などの組み込み要素を使用しないでください

スタイリング

Apple ヒューマンインターフェースガイドラインに従ってください。

一般的なスタイリングルール

  • マージンやパディングスタイルよりフレックスギャップを優先してください
  • マージンよりパディングを優先してください
  • セーフエリアは常に、スタックヘッダー、タブ、または ScrollView/FlatList の contentInsetAdjustmentBehavior="automatic" のいずれかで考慮してください
  • トップとボトムの両方のセーフエリア内スペースを確保してください
  • スタイルを再利用する場合を除き、StyleSheet.create ではなくインラインスタイルを使用してください
  • 状態変化にエンタリング(要素出現)とエグジット(要素消失)のアニメーションを追加してください
  • カプセル形以外の丸角には { borderCurve: 'continuous' } を使用してください
  • ページ上のカスタムテキスト要素の代わりに、常にナビゲーションスタックのタイトルを使用してください
  • ScrollView にパディングするときは、ScrollView 自体のパディングではなく contentContainerStyle のパディングとギャップを使用してください(クリッピングを減らします)
  • CSS と Tailwind はサポートされていません。インラインスタイルを使用してください

色

expo-router の Color API を使用してネイティブセマンティックカラーを使用してください。これは PlatformColor に対するタイプセーフなラッパーで、iOS UIKit カラーを Color.ios.* で、Android Material 3 カラーを Color.android.material.*(静的)または Color.android.dynamic.*(Android 12+ ではユーザーの壁紙に適応)で公開しています。これらはデバイス上で解決され、ライト/ダークモードとアクセシビリティ設定に自動適応するため、別のライト/ダーク十六進数テーブルや colors.web.ts ファイルを保守する必要がなくなります。

Color はプラットフォーム固有なので、各値を Platform.select でラップし、Web 向けの十六進数フォールバックを提供してください。パレットを theme/colors.ts に集約し、すべての場所から colors をインポートしてください:

// theme/colors.ts
import { Platform } from "react-native";
import { Color } from "expo-router";

export const colors = {
  label: Platform.select({
    ios: Color.ios.label,
    android: Color.android.dynamic.onSurface,
    default: "#000000",
  })!,
  secondaryLabel: Platform.select({
    ios: Color.ios.secondaryLabel,
    android: Color.android.dynamic.onSurfaceVariant,
    default: "#3c3c43",
  })!,
  separator: Platform.select({
    ios: Color.ios.separator,
    android: Color.android.dynamic.outlineVariant,
    default: "#c6c6c8",
  })!,
  systemBackground: Platform.select({
    ios: Color.ios.systemBackground,
    android: Color.android.dynamic.surface,
    default: "#ffffff",
  })!,
  systemBlue: Platform.select({
    ios: Color.ios.systemBlue,
    android: Color.android.dynamic.primary,
    default: "#007aff",
  })!,
};
import { colors } from "@/theme/colors";

<View style={{ backgroundColor: colors.systemBackground }}>
  <Text style={{ color: colors.label }}>Title</Text>
</View>;
  • iOS はシステムテーマが変わると自動的にこれらの色を再解決します。Android では、これらを描画するすべてのコンポーネント内で useColorScheme() を呼び出して、テーマが切り替わったときに再描画されるようにしてください(React Compiler がコンポーネントをメモ化する場合に必須です)
  • Color / PlatformColor の値を Reanimated スタイルに渡さないでください。そこでは静的色を使用してください(references/animations.md を参照)
  • Platform.select({...})! は string | OpaqueColorValue を返します。ほとんどの React Native スタイルプロップは ColorValue(string | OpaqueColorValue)を受け入れるため、これは正常に機能します。ただし、一部のサードパーティプロップは string のみを受け入れます(例: expo-image の tintColor)。必要に応じてキャストしてください: colors.label as string

テキストスタイリング

  • 重要なデータやエラーメッセージを表示する <Text/> 要素には常に selectable プロップを追加してください
  • カウンターには { fontVariant: 'tabular-nums' } を使用して配置を調整してください

シャドウ

CSS の boxShadow スタイルプロップを使用してください。レガシーな React Native のシャドウまたはエレベーションスタイルを絶対に使用しないでください。

<View style={{ boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)" }} />

インセットシャドウがサポートされています。

フィードバック送信

このスキルにエラー、誤解を招く情報、または古い情報が見つかった場合、

原文(English)を表示

Expo Native UI Guidelines

For routes, links, stacks, tabs, modals, sheets, and headers, use the expo-router skill.

Before picking any UI component, check expo-ui first. @expo/ui provides native equivalents — BottomSheet, Button, Picker, Slider, Menu, Section, Switch, SegmentedControl, and more — rendered as real SwiftUI on iOS and Jetpack Compose on Android, available in Expo Go on SDK 56+ with no custom build. Load the expo-ui skill to find the right component before falling back to React Native built-ins or community libraries. This skill (expo-native-ui) covers the surrounding structure: Expo Router navigation, layout, styling, and animations.

References

Consult these resources as needed:

references/
  animations.md          Reanimated: entering, exiting, layout, scroll-driven, gestures
  controls.md            Native iOS: Switch, Slider, SegmentedControl, DateTimePicker, Picker
  gradients.md           CSS gradients via experimental_backgroundImage (New Arch only)
  icons.md               SF Symbols via expo-image (sf: source), names, animations, weights
  media.md               Camera, audio, video, and file saving
  storage.md             SQLite, AsyncStorage, SecureStore
  visual-effects.md      Blur (expo-blur) and liquid glass (expo-glass-effect)
  webgpu-three.md        3D graphics, games, GPU visualizations with WebGPU and Three.js

Running the App

CRITICAL: Always try Expo Go first before creating custom builds.

Most Expo apps work in Expo Go without any custom native code. Before running npx expo run:ios or npx expo run:android:

  1. Start with Expo Go: Run npx expo start and scan the QR code with Expo Go
  2. Check if features work: Test your app thoroughly in Expo Go
  3. Only create custom builds when required - see below

When Custom Builds Are Required

You need npx expo run:ios/android or eas build ONLY when using:

  • Local Expo modules (custom native code in modules/)
  • Apple targets (widgets, app clips, extensions via @bacons/apple-targets)
  • Third-party native modules not included in Expo Go
  • Custom native configuration that can't be expressed in app.json

When Expo Go Works

Expo Go supports a huge range of features out of the box:

  • All expo-* packages (camera, location, notifications, etc.)
  • Expo Router navigation
  • Most UI libraries (reanimated, gesture handler, etc.)
  • Push notifications, deep links, and more

If you're unsure, try Expo Go first. Creating custom builds adds complexity, slower iteration, and requires Xcode/Android Studio setup.

Code Style

  • Be cautious of unterminated strings. Ensure nested backticks are escaped; never forget to escape quotes correctly.
  • Always use import statements at the top of the file.
  • Always use kebab-case for file names, e.g. comment-card.tsx
  • Never use special characters in file names
  • Configure tsconfig.json with path aliases, and prefer aliases over relative imports for refactors.

Library Preferences

  • For any sheet, picker, slider, toggle, menu, or grouped-form section: use @expo/ui (see expo-ui skill) before reaching for a React Native built-in or community library — it renders native SwiftUI/Compose and works in Expo Go on SDK 56+. For grouped/settings-style rows (short, fixed-length), use @expo/ui's List + ListItem. For large or unknown-length scrolling lists (feeds, search results, catalogs), use FlatList or FlashList — @expo/ui's List is not virtualized.
  • Never use modules removed from React Native such as Picker, WebView, SafeAreaView, or AsyncStorage
  • Never use legacy expo-permissions
  • expo-audio not expo-av
  • expo-video not expo-av
  • expo-image with source="sf:name" for SF Symbols, not expo-symbols or @expo/vector-icons
  • react-native-safe-area-context not react-native SafeAreaView
  • process.env.EXPO_OS not Platform.OS
  • React.use not React.useContext
  • expo-image Image component instead of intrinsic element img
  • expo-glass-effect for liquid glass backdrops
  • Color from expo-router for native semantic colors, not raw PlatformColor (type-safe, auto-adapts to light/dark)
  • In SDK 56+, never import from @react-navigation/* directly — use expo-router/react-navigation instead (covers @react-navigation/native, /core, /elements, /routers)

Responsiveness

  • Always wrap root component in a scroll view for responsiveness
  • Use <ScrollView contentInsetAdjustmentBehavior="automatic" /> instead of <SafeAreaView> for smarter safe area insets
  • contentInsetAdjustmentBehavior="automatic" should be applied to FlatList and SectionList as well
  • Use flexbox instead of Dimensions API
  • ALWAYS prefer useWindowDimensions over Dimensions.get() to measure screen size

Behavior

  • Use expo-haptics conditionally on iOS to make more delightful experiences
  • Use views with built-in haptics like <Switch /> from React Native and @react-native-community/datetimepicker
  • When a route belongs to a Stack, its first child should almost always be a ScrollView with contentInsetAdjustmentBehavior="automatic" set
  • When adding a ScrollView to the page it should almost always be the first component inside the route component
  • Use the <Text selectable /> prop on text containing data that could be copied
  • Consider formatting large numbers like 1.4M or 38k
  • Never use intrinsic elements like 'img' or 'div' unless in a webview or Expo DOM component

Styling

Follow Apple Human Interface Guidelines.

General Styling Rules

  • Prefer flex gap over margin and padding styles
  • Prefer padding over margin where possible
  • Always account for safe area, either with stack headers, tabs, or ScrollView/FlatList contentInsetAdjustmentBehavior="automatic"
  • Ensure both top and bottom safe area insets are accounted for
  • Inline styles not StyleSheet.create unless reusing styles is faster
  • Add entering and exiting animations for state changes
  • Use { borderCurve: 'continuous' } for rounded corners unless creating a capsule shape
  • ALWAYS use a navigation stack title instead of a custom text element on the page
  • When padding a ScrollView, use contentContainerStyle padding and gap instead of padding on the ScrollView itself (reduces clipping)
  • CSS and Tailwind are not supported - use inline styles

Colors

Use the Color API from expo-router for native semantic colors. It is a type-safe wrapper over PlatformColor that exposes iOS UIKit colors through Color.ios.* and Android Material 3 colors through Color.android.material.* (static) or Color.android.dynamic.* (adapts to the user's wallpaper on Android 12+). These resolve on-device and automatically adapt to light/dark mode and accessibility settings, so you no longer maintain separate light/dark hex tables or a colors.web.ts file.

Color is platform-specific, so wrap each value in Platform.select with a default hex fallback for web. Centralize the palette in theme/colors.ts and import colors everywhere:

// theme/colors.ts
import { Platform } from "react-native";
import { Color } from "expo-router";

export const colors = {
  label: Platform.select({
    ios: Color.ios.label,
    android: Color.android.dynamic.onSurface,
    default: "#000000",
  })!,
  secondaryLabel: Platform.select({
    ios: Color.ios.secondaryLabel,
    android: Color.android.dynamic.onSurfaceVariant,
    default: "#3c3c43",
  })!,
  separator: Platform.select({
    ios: Color.ios.separator,
    android: Color.android.dynamic.outlineVariant,
    default: "#c6c6c8",
  })!,
  systemBackground: Platform.select({
    ios: Color.ios.systemBackground,
    android: Color.android.dynamic.surface,
    default: "#ffffff",
  })!,
  systemBlue: Platform.select({
    ios: Color.ios.systemBlue,
    android: Color.android.dynamic.primary,
    default: "#007aff",
  })!,
};
import { colors } from "@/theme/colors";

<View style={{ backgroundColor: colors.systemBackground }}>
  <Text style={{ color: colors.label }}>Title</Text>
</View>;
  • iOS re-resolves these colors automatically when the system theme changes. On Android, call useColorScheme() inside any component that renders them so it re-renders when the theme flips (required when React Compiler memoizes the component).
  • Don't pass Color / PlatformColor values into Reanimated styles — use static colors there (see references/animations.md).
  • Platform.select({...})! returns string | OpaqueColorValue. Most React Native style props accept ColorValue (string | OpaqueColorValue) so this works fine. But some third-party props only accept string (e.g. tintColor on expo-image). Cast when needed: colors.label as string.

Text Styling

  • Add the selectable prop to every <Text/> element displaying important data or error messages
  • Counters should use { fontVariant: 'tabular-nums' } for alignment

Shadows

Use CSS boxShadow style prop. NEVER use legacy React Native shadow or elevation styles.

<View style={{ boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)" }} />

'inset' shadows are supported.

Submitting Feedback

If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:

npx --yes submit-expo-feedback@latest --category skills --subject "expo-native-ui" "<actionable feedback>"

Only submit when you have something specific and actionable to report. Include as much relevant context as possible. If an AI agent repeatedly failed or the user had to take over an Expo task, load the expo-skill-feedback skill and follow its eval-candidate flow instead of reusing the command above.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。