• 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

building-native-ui

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

Appleの設計ガイドライン(HIG)に沿ったスタイリング、意味のある色使い、ネイティブコントロール、SF Symbols(Appleのアイコン集)、メディア、アニメーション、視覚効果、グラデーション、ストレージ、レスポンシブレイアウトに対応した、美しいExpoの画面を構築できます。 ルーティングやナビゲーション機能が必要な場合は、expo-router スキルを使用してください。

原文を表示

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.

ユースケース
  • Appleのデザイン規格に準拠した画面構築
  • SF Symbolsでアイコンを配置
  • アニメーションや視覚効果を実装
  • レスポンシブレイアウトに対応させる
本文(日本語訳)

Expo UI ガイドライン

ルート(画面遷移経路)、リンク、スタック、タブ、モーダル(画面上に浮かぶ窓)、シート、ヘッダーについては、expo-router スキルを使用してください。

参考資料

必要に応じて以下のリソースを参照してください:

references/
  animations.md          Reanimated: 表示/非表示アニメーション、レイアウト変化、スクロール連動、ジェスチャー
  controls.md            ネイティブiOS: スイッチ、スライダー、セグメントコントロール、日時選択、ピッカー
  gradients.md           CSSグラデーション(experimental_backgroundImage経由、新アーキテクチャ版のみ)
  icons.md               SF Symbols(expo-imageのsf:ソース経由)、名前、アニメーション、太さ
  media.md               カメラ、音声、動画、ファイル保存
  storage.md             SQLite、ローカルストレージ、セキュア保存
  visual-effects.md      ブラー(ぼかし)効果、リキッドグラス効果
  webgpu-three.md        3Dグラフィックス、ゲーム、GPU処理(WebGPU・Three.js使用)

アプリの実行方法

重要: カスタムビルドを作成する前に、必ず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、ジェスチャーハンドラーなど)
  • プッシュ通知、ディープリンク、その他多数

判断に迷ったら、まずExpo Goを試してください。 カスタムビルドを作成すると複雑性が増し、開発の速度が落ち、Xcode・Android Studioのセットアップが必要になります。

コードスタイル

  • 閉じられていない文字列に注意してください。ネストされたバッククォートはエスケープし、引用符も正しくエスケープしてください
  • ファイルの先頭に import 文を記述してください
  • ファイル名には常にケバブケース(単語をハイフンで区切る形式)を使用してください。例: comment-card.tsx
  • ファイル名に特殊文字を使用しないでください
  • tsconfig.json をパスエイリアスで設定し、相対パスではなくエイリアスを使用してください(リファクタリング時に有利)

ライブラリの選定基準

  • React Native から削除されたモジュール(Picker、WebView、SafeAreaView、AsyncStorage)を使用しないでください
  • 古い expo-permissions を使用しないでください
  • expo-av ではなく expo-audio を使用してください
  • expo-av ではなく expo-video を使用してください
  • expo-symbols や @expo/vector-icons ではなく、expo-image に source="sf:name" を指定してSF Symbolsを使用してください
  • 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 ではなくFlexbox を使用してください
  • 画面サイズを測定する場合は、Dimensions.get() ではなく 必ず useWindowDimensions を使用してください

動作・使用感

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

スタイル

Apple Human Interface Guidelines に従ってください。

一般的なスタイルルール

  • margin や padding ではなく、flex gap を優先してください
  • margin より padding を優先してください
  • 安全領域は常にアカウントしてください。スタックヘッダー、タブ、または ScrollView/FlatList の contentInsetAdjustmentBehavior="automatic" を使用して対応してください
  • 上下両方の安全領域を必ず考慮してください
  • StyleSheet.create を使用するのではなくインラインスタイルを使用してください(スタイルを再利用する場合を除く)
  • 状態変化時にはアニメーション(表示・非表示など)を追加してください
  • 角丸コーナーには { borderCurve: 'continuous' } を使用してください(カプセル形を作る場合を除く)
  • ページ内のカスタムテキスト要素ではなく、常にナビゲーションスタックのタイトルを使用してください
  • ScrollView にパディングを追加する場合、ScrollView 自体にパディングを設定するのではなく、contentContainerStyle にパディングとギャップを設定してください(クリッピング を削減)
  • CSS と Tailwind はサポートされていません — インラインスタイルを使用してください

色

expo-router の Color API を使用してネイティブなセマンティックカラー(意味を持つ色)を指定してください。これは PlatformColor の型安全なラッパーで、Color.ios.* を通じて iOS UIKit の色、Color.android.material.*(静的)または Color.android.dynamic.*(ユーザーの壁紙に適応)を通じて Android Material 3 の色を提供します。これらはデバイス上で解決され、ライト・ダークモードとアクセシビリティ設定に自動適応するため、ライト・ダーク用の16進数カラーテーブルや colors.web.ts ファイルを管理する必要がなくなります。

Color はプラットフォーム固有のため、各値を Platform.select で Web用の16進数フォールバック付きでラップしてください。パレットを 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)" }} />

内側の影(inset)もサポートされています。

原文(English)を表示

Expo UI Guidelines

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

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

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

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