Communitygithub.com

Expo UI (@expo/ui)

Framework (OSS). Erstelle native Benutzeroberflächen mit dem Paket @expo/ui: echtes SwiftUI auf iOS und Jetpack Compose auf Android. Verwende standardmäßig @expo/ui für Sheets (BottomSheet), Picker, Slider, Toggles, Menüs und gruppierte Formularabschnitte – greife NICHT zu Reanimated, @gorhom/bottom-sheet oder den RN-eigenen Picker/Switch; nutze stattdessen @expo/ui. Falle nur dann auf RN-Eigene zurück, wenn @expo/ui die Komponente nicht bereitstellt. HINWEIS: @expo/ui List rendert native gruppierte Zeilen wie einen iOS-Einstellungsbildschirm – es ist KEINE virtualisierte Liste; verwende FlatList/FlashList für große Datensätze. Die Beschreibung umfasst universelle Komponenten (Host, Column, Row, Button, Text, List, BottomSheet, FieldGroup, Switch, Slider, Picker, Menu), Drop-in-Ersatz für RN Community Libraries sowie plattformspezifische SwiftUI/Jetpack Compose-Bäume. Nicht für Expo Router Navigation, Reanimated oder Datenabruf.

Was ist ui)?

@expo/ui ist ein Open-Source-Framework, das echte native UI aus React rendert: SwiftUI auf iOS und Jetpack Compose auf Android. Es bietet eine universelle Komponentenschicht sowie plattformspezifische APIs für maximale Flexibilität. Entwickler werden angewiesen, @expo/ui als erste Wahl für grundlegende UI-Elemente wie Bottom Sheets, Picker, Slider, Toggles, Menüs und gruppierte Formularbereiche zu verwenden, anstatt auf Bibliotheken wie Reanimated oder @gorhom/bottom-sheet zurückzugreifen. Ein wichtiger Hinweis betrifft die `List`-Komponente, die native, nicht virtualisierte, gruppierte Zeilen rendert – ideal für Einstellungsbildschirme, aber nicht für große Datensätze; dafür sind FlatList oder FlashList vorgesehen. Das Framework enthält auch API-kompatible Drop-in-Ersatzteile für beliebte RN Community Libraries, sodass die Migration bestehender Projekte erleichtert wird. Die Installation erfolgt über `npx expo install @expo/ui`, und jede @expo/ui-Struktur muss in einen `Host`-Wrapper eingebettet sein.

Funktioniert mit~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/expo/skills/tree/main/plugins/expo/skills/expo-ui

In Ihrer bevorzugten KI fragen

Öffnet einen neuen Chat, in dem dieser Agent-Skill bereits geladen ist.

Dokumentation

Was macht ui)?

@expo/ui rendert echte native UI aus React: SwiftUI auf iOS, Jetpack Compose auf Android. Es enthält auch Drop-in-Ersatzteile für die Migration von RN Community UI Bibliotheken.

Diese Anweisungen beziehen sich auf die neueste Expo SDK. Die universelle Schicht erfordert SDK 56+ und funktioniert in Expo Go – ohne benutzerdefinierten Build. Drop-in-Ersatzteile und die plattformspezifischen Schichten sind auch auf SDK 55 verfügbar. Für Komponentendetails zu einer bestimmten SDK siehe die Expo UI Dokumentation für diese Version.

Installation

npx expo install @expo/ui

Jeder @expo/ui-Baum – universell oder plattformspezifisch – muss in Host eingewickelt werden.

Verwende @expo/ui standardmäßig – greife nicht zuerst zu RN-Alternativen

Bevor du Reanimated, @gorhom/bottom-sheet, die eingebauten Switch/Picker von React Native oder eine andere Community UI Bibliothek für die unten genannten Elemente verwendest, nutze stattdessen @expo/ui. Falle nur dann auf RN-Eigene zurück, wenn @expo/ui die Komponente nicht bereitstellt.

BedarfVerwende
Hochschiebbares Sheet / Bottom SheetBottomSheet von @expo/ui – nicht Reanimated oder @gorhom/bottom-sheet
Gruppierte native Listenzeilen (Einstellungen/Formularstil)List + ListItem von @expo/ui – nicht FlatList (siehe Hinweis unten)
UmschalterSwitch von @expo/ui
SchiebereglerSlider von @expo/ui
Datums-/Zeitauswahl@expo/ui/community/datetimepicker
MenüMenu von @expo/ui
Formularabschnitt mit BeschriftungFieldGroup von @expo/ui
Einklappbarer AbschnittCollapsible von @expo/ui

List ist KEINE virtualisierte Scroll-Liste. Sie rendert native gruppierte Tabellenzeilen – das visuelle Erscheinungsbild eines iOS-Einstellungsbildschirms oder eines Formularabschnitts mit Offenlegungsindikatoren und nativer Zeilengestaltung. Jedes ListItem ist ein nativer Knoten im JS-Thread; Zeilen werden nicht recycelt. Verwende für jede Liste mit großen oder unbekannten Datenmengen (Feeds, Suchergebnisse, Kataloge) stattdessen FlatList oder FlashList. List ist die richtige Wahl für kurze, feste Gruppen: einen Einstellungsbildschirm, die Zeilen eines Detailpanels, ein festes Menü.

BottomSheet-Beispiel (verwende dies für Karten-Pin-Details, Aktionsblätter, Detailpanels – nicht Reanimated):

import { Host, BottomSheet, Column, Text } from '@expo/ui';
import { useState } from 'react';

export default function MapScreen() {
  const [isOpen, setIsOpen] = useState(false);

  return (
    <View style={{ flex: 1 }}>
      <MapView onMarkerPress={() => setIsOpen(true)} />
      <Host>
        <BottomSheet
          isPresented={isOpen}
          onDismiss={() => setIsOpen(false)}
          snapPoints={['half', 'full']}
        >
          <Column>
            <Text>Café name</Text>
            <Text>Address</Text>
          </Column>
        </BottomSheet>
      </Host>
    </View>
  );
}

BottomSheet verwendet isPresented/onDismiss – nicht isOpened, isOpen, onIsOpenedChange oder onChange (dies sind Props von @gorhom/bottom-sheet und werden stillschweigend nichts bewirken). snapPoints akzeptiert 'half', 'full', { fraction: 0.5 } oder { height: 400 } und ist optional (passt die Größe automatisch an den Inhalt an, wenn weggelassen).

Auswahl des Ansatzes

Arbeite diese Liste von oben nach unten ab und stoppe bei der ersten Schicht, die den Anforderungen genügt:

  1. Universelle Komponenten – beginne hier. Importiere aus dem @expo/ui Root. Ein einziger Komponentenbaum läuft unverändert auf iOS, Android und Web von einer einzigen Quelle (Compose auf Android, SwiftUI auf iOS, react-native-web/react-dom auf Web). Keine Plattformdateien-Aufteilung. → ./references/universal.md

  2. Plattformspezifisch (SwiftUI / Jetpack Compose). Importiere aus @expo/ui/swift-ui oder @expo/ui/jetpack-compose. Verwende sie nur, wenn die universelle Schicht eine benötigte Komponente oder einen Modifikator nicht bereitstellt, oder wenn du plattformspezifisches Verhalten oder Optimierung benötigst. Nachteil: Du schreibst zwei Bäume und teilst sie in .ios.tsx / .android.tsx Dateien auf (oder verzweigst mit Platform.OS) – mehr Code zu pflegen.

    @expo/ui/swift-ui ist nur für iOS. @expo/ui/jetpack-compose ist nur für Android. Wenn du eine Datei importierst, die auf der anderen Plattform läuft, führt dies zur Laufzeit zu Abstürzen mit der Fehlermeldung „Unable to get view config“. Isoliere plattformspezifische Bäume in .ios.tsx / .android.tsx Dateien, die in components/ abgelegt sind (niemals innerhalb von app/ – Expo Router unterstützt keine Plattformerweiterungen für Routendateien), oder schütze sie mit Platform.OS in einer regulären Routendatei. Host muss immer aus @expo/ui (dem universellen Paketstamm) importiert werden, nicht aus den plattformspezifischen Unterpaketen. → ./references/swift-ui.md und ./references/jetpack-compose.md

Verwendest du bereits eine RN Community UI Bibliothek? @expo/ui bietet auch Drop-in-Ersatzteile – API-kompatible Austausche für beliebte Bibliotheken (@gorhom/bottom-sheet, @react-native-community/datetimepicker und mehr), importiert aus @expo/ui/community/<name>. Dies ist ein Migrations-Pfad, um eine bestehende Abhängigkeit zu ersetzen, und kein Schritt in der obigen Entscheidung zwischen universell und plattformspezifisch. → ./references/drop-in-replacements.md

Referenzen

Bei Bedarf diese Ressourcen konsultieren:

references/
  universal.md             Universelle @expo/ui Komponenten und deren Verwendung (SDK 56+)
  drop-in-replacements.md  API-kompatibler Ersatz für RN Community UI Bibliotheken
  swift-ui.md              Plattformspezifische iOS UI: @expo/ui/swift-ui Komponenten, Modifikatoren, RNHostView, useNativeState
  jetpack-compose.md       Plattformspezifische Android UI: @expo/ui/jetpack-compose Komponenten, Modifikatoren, LazyColumn-Hinweis, Icons, useNativeState

Feedback einreichen

Wenn du Fehler, irreführende oder veraltete Informationen in dieser Fähigkeit bemerkst, melde sie, damit Expo sie verbessern kann:

npx --yes submit-expo-feedback@latest --category skills --subject "expo-ui" "<konstruktives Feedback>"

Reiche nur ein, wenn du etwas Konkretes und Umsetzbares zu melden hast. Gib so viele relevante Zusammenhänge wie möglich an. Wenn ein KI-Agent wiederholt fehlschlug oder der Benutzer eine Expo-Aufgabe übernehmen musste, lade die expo-skill-feedback Fähigkeit und folge dem eval-candidate Ablauf anstatt das obige Kommando erneut zu verwenden.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

expo/add-app-clip

Add an iOS App Clip target to an Expo app. Use when the user mentions App Clip, AASA, apple-app-site-association, appclips, smart app banner, or wants to ship a lightweight iOS Clip invoked from a URL alongside their parent app.

expo/building-native-ui

Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.

expo/eas-update-insights

Check the health of published EAS Updates: crash rates, install/launch counts, unique users, payload size, and the split between embedded and OTA users per channel. Use when the user asks how an update is performing, whether a rollout is healthy, how many users are on the embedded build vs OTA, or wants to gate CI on update health.

expo/expo-api-routes

Guidelines for creating API routes in Expo Router with EAS Hosting

expo/expo-brownfield

Integrate Expo and React Native into an existing native iOS or Android app. Use when the user mentions brownfield, embedding React Native in a native app, AAR/XCFramework, or adding Expo to an existing Kotlin/Swift project. Covers both the isolated approach and the integrated approach.

expo/expo-cicd-workflows

Helps understand and write EAS workflow YAML files for Expo projects. Use this skill when the user asks about CI/CD or workflows in an Expo or EAS context, mentions .eas/workflows/, or wants help with EAS build pipelines or deployment automation.

expo/expo-deployment

Deploying Expo apps to iOS App Store, Android Play Store, web hosting, and API routes

expo/expo-dev-client

Build and distribute Expo development clients locally or via TestFlight

expo/expo-examples

Framework (OSS). Expo's official example projects - the expo/examples repo of ~70 `with-*` integrations (Stripe, Clerk, Supabase, OpenAI, maps, Reanimated, SQLite, Skia, NativeWind, and more). Use when integrating a third-party library or service into an existing Expo app and you want the canonical, version-matched pattern to adapt, or when scaffolding a new project from one with `npx create-expo --example`.

expo/expo-module

Guide for creating and writing Expo native modules and views using the Expo Modules API (Swift, Kotlin, TypeScript). Covers module definition DSL, native views, shared objects, config plugins, lifecycle hooks, autolinking, and type system. Use when building or modifying native modules for Expo.

expo/expo-observe

Use for anything related to EAS Observe — adding `expo-observe` to an Expo project (AppMetricsRoot/ObserveRoot HOC, markInteractive, the useObserve hook, and the Expo Router / React Navigation integrations for per-route metrics), querying via the EAS CLI (`eas observe:metrics-summary`, `observe:metrics`, `observe:routes`, `observe:events`, `observe:versions`), or interpreting the resulting metrics (cold/warm launch, TTR, TTI, navigation cold/warm TTR, update download, and the TTI frameRate params for triaging slow startups).

expo/expo-overview

Framework (OSS). Entry point and router for every Expo or EAS task. Load this skill first — before writing code and before choosing another expo-* / eas-* skill — when the request, PRD, or spec mentions Expo, EAS, Expo Go, or an expo-* package, or the project has an `expo` dependency in `package.json`. Within that gate it also covers app specs and designs to implement (tabs, stacks, maps, lists, navigation, building from a screenshot), and phrasings like 'implement a mobile app', 'make my app look native', 'add navigation', 'fetch some data', 'upgrade my SDK', 'add Expo to my existing native app', 'ship to the App Store', or 'I'm new to Expo, where do I start'. A fully specified request (SDK pinned, libraries named, layout given) still routes through here — the shared setup rules still apply. Do NOT load it when neither signal is present: a bare React Native project with no `expo` dependency is not Expo work. Detects the real goal, routes to the right expo-* / eas-* skill, and owns the shared setup rules.

expo/expo-router

Framework (OSS). Navigation and routing for Expo Router. Covers file-based routes, groups and dynamic routes, folder organization, Link with previews and context menus, native Stack, page titles, modals and form sheets, NativeTabs, headers and toolbars, and header search bars.

expo/expo-skill-eval

Evaluate Expo skills in this repo end-to-end - trigger accuracy, generated code quality, and runtime screenshots on iOS simulator and Android emulator via Expo Go (web optional). Use when the user wants to eval an Expo skill, test that a skill produces working code, benchmark a skill with device screenshots, or verify a skill's output renders correctly.

expo/expo-tailwind-setup

Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling

expo/expo-ui-jetpack-compose

`@expo/ui/jetpack-compose` package lets you use Jetpack Compose Views and modifiers in your app.

expo/expo-ui-swiftui

`@expo/ui/swift-ui` package lets you use SwiftUI Views and modifiers in your app.

expo/expo-upgrade

Framework (OSS). Guidelines for upgrading Expo SDK versions and fixing dependency issues

expo/native-data-fetching

Use when implementing or debugging ANY network request, API call, or data fetching. Covers fetch API, React Query, SWR, error handling, caching, offline support, and Expo Router data loaders (`useLoaderData`).

expo/skills

Build and submit iOS and Android apps with EAS to TestFlight, the App Store, or Google Play. Supports Expo and other React Native projects, plus existing native apps. Use for eas.json setup, release pipelines, signing, app versions and build numbers, store submissions, and listing metadata. For Expo websites and API routes, use eas-hosting; for adding React Native screens to a native app, use expo-brownfield.

Verwandte Skills