Expo UI SwiftUI views
Writes React Native code that renders native SwiftUI views with Expo UI, so iOS screens size and style correctly.
What we improved
Made SKILL.md carry the method. The original was an index of 53 rule files with no substance of its own; it now states the core rules with code (Host boundaries and sizing, modifiers and their order, sheet presentation, native state and wor
Improved by YourAISkill from the original by pproenca, under its MIT licence. The download includes the author's licence and a CHANGES.md listing every change. Both Claude reviews read the improved version.
Claude's review
8/10 Dense, version-pinned @expo/ui SwiftUI guide covering Host sizing, modifier order, sheets, native state and HIG rules with many incorrect/correct rule files.
We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.
In detail
Library reference for @expo/ui SwiftUI components on iOS — covers Host boundaries, modifier composition, iOS 26 Liquid Glass and Human Interface Guidelines composition rules, layout/input/navigation/display catalogues, and ObservableState patterns. Use this skill whenever writing or reviewing React Native code that imports from @expo/ui/swift-ui or @expo/ui/swift-ui/modifiers — including new Expo apps adopting native SwiftUI views, migrations from React Native primitives to expo-ui, and code targeting iOS 26 features (Liquid Glass, GlassEffectContainer, sheet detents). Trigger even if the user does not explicitly mention "expo-ui" but is writing iOS-targeted Expo UI code that should bridge to SwiftUI.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: expo-ui
description: "Write and review React Native code that renders native SwiftUI views on iOS through @expo/ui/swift-ui and @expo/ui/swift-ui/modifiers. Covers Host boundaries and sizing (matchContents, useViewportSizeMeasurement), styling through modifiers and their order, BottomSheet presentation modifiers, useNativeState and worklets, animation, Liquid Glass on iOS 26, Apple HIG rules for sheets, dialogs, popovers and menus, and a verified prop cheat sheet for the main components. Use when code imports from @expo/ui/swift-ui, when moving React Native screens to native SwiftUI controls, when a SwiftUI view does not render, has the wrong size or ignores styles, or when targeting iOS 26 features. Not for the Jetpack Compose (Android) side of @expo/ui or for expo-router navigation."
---
<!-- Modified by YourAISkill (youraiskill.com) on 2 December 2026 from the original by pproenca. See CHANGES.md. -->
# Expo @expo/ui SwiftUI Best Practices
Rules for `@expo/ui/swift-ui` and `@expo/ui/swift-ui/modifiers`, the iOS side of Expo's native UI package. This file carries the method; `references/` holds 53 rule files, each with an incorrect and a correct example.
APIs here were checked against the published type definitions of `@expo/ui` 56.0.x (Expo SDK 56); the core APIs used below are unchanged in 57 and 58. When unsure about a prop, the fastest source of truth is the installed typings: `node_modules/@expo/ui/build/swift-ui/<Component>/index.d.ts` and `.../swift-ui/modifiers/index.d.ts`, whose `@platform` tags give the minimum iOS version.
## When to apply
- Building a screen with `@expo/ui/swift-ui`: choosing Form, List or ScrollView, wrapping in Host, applying modifiers
- Replacing React Native primitives (View, Text, TouchableOpacity, TextInput) with native SwiftUI controls
- iOS 26 work: Liquid Glass, `GlassEffectContainer`, sheet detents
- Debugging "the SwiftUI view does not render, is the wrong size or ignores styles" (almost always Host or modifiers)
- Presentation surfaces (Alert, ConfirmationDialog, BottomSheet, Popover, Menu) and controlled inputs
Not for: `@expo/ui/jetpack-compose` (Android), stack or tab routing (use `expo-router`; for routed native tabs, `expo-router/unstable-native-tabs`), or apps that must look identical on Android without platform code.
## Core rules
### 1. Every SwiftUI tree lives in one Host
`Host` is the only component that mounts SwiftUI inside React Native. A SwiftUI component outside a Host gets no size and no rendering. Do not nest Host inside Host. Give Host a single root child (a stack, Form, List or ScrollView) when you have several views.
### 2. Size the Host deliberately
| Content | Host setup |
|---|---|
| Intrinsically sized (Button, Text, a small HStack) | `matchContents` (or `{ horizontal: true }` / `{ vertical: true }` with the other axis set by `style`) |
| Fills the screen (Form, List, ScrollView) | `useViewportSizeMeasurement` with `style={{ flex: 1 }}` |
| Fixed slot in a React Native layout | `style={{ height: 56 }}` or similar |
`matchContents` is read once on mount; decide up front. A Form inside a `matchContents` Host collapses, because Form wants to fill the space it is offered.
Other Host props: `colorScheme` (`'light' | 'dark'`; pass it when the app has its own theme switch, or SwiftUI follows the system), `ignoreSafeArea` (`'all'`, `'container'` or `'keyboard'`; use for backgrounds and full-bleed surfaces, never for controls), `layoutDirection`, `seedColor` (tint for the whole tree), `onLayoutContent`.
...From pproenca's repository, MIT licence.
Related skills
-
Checked
Android Gradle Plugin upgrade
Moves Kotlin Multiplatform projects to Android Gradle Plugin 9 and fixes the build failures it causes.
8/101 credit -
Checked
CocoaPods to SwiftPM
Moves Kotlin Multiplatform projects from CocoaPods to Swift Package Manager and updates the Xcode project.
8/101 credit -
Checked
Kotlin Native build speed
Diagnoses and fixes slow Kotlin/Native iOS builds in Kotlin Multiplatform projects, both locally and on CI.
7/101 credit -
Checked
SwiftUI Liquid Glass
Adds and reviews Liquid Glass in SwiftUI apps for iOS 26, avoiding pitfalls with bars, buttons and scrolling.
7/101 credit -
Checked
Native Mobile App Design
Designs Expo and React Native screens that feel truly native, with proper navigation, motion and dark mode.
7/101 credit -
Checked
Offline Android LLM apps
Builds an Android app that runs an open LLM on the phone with LiteRT, so it works without a server.
7/101 credit