Repository navigation
v7 is a rewrite of swiftui-react-native. Every view and modifier now comes from the SwiftUI in Apple's SDK, so the library follows SwiftUI itself instead of a hand-picked subset of it. Your JSX renders real SwiftUI, typed end to end.
This release has breaking changes. See Upgrading from v6 below.
npm install swiftui-react-native react-native-nitro-modules
cd ios && pod installDocumentation: swiftui.rit3zh.dev
Highlights
-
All of SwiftUI, typed. 108 views and 438 modifiers, generated from Apple's SDK. Each one comes with Apple's documentation, the SwiftUI declaration it maps to and the iOS version it needs.
-
Built on the New Architecture. Fabric components, Codegen and Nitro Modules. Expo Modules is no longer required, so it works in bare React Native apps as well as in Expo development builds.
-
Modifiers chain the way they do in SwiftUI.
<Text modifiers={compose().font('title').bold().foregroundStyle('secondary')}>Hello</Text>
-
iOS 26 and Liquid Glass.
GlassEffectContainer, theglassEffectmodifier,ConcentricRectangle,TabandToolbarSpacer. -
State that SwiftUI can observe.
useBinding,ObservableandObservableObjectwithuseObservableanduseStateObject, environment objects withuseEnvironmentanduseEnvironmentObject, and focus withuseFocusedValueanduseFocusedObject. -
Drawing.
Path,Canvasand custom shapes made withcreateShape. -
Animation.
PhaseAnimator,KeyframeAnimatorandTimelineView. -
Works with more than the newest Xcode. It builds with Xcode 26.0 and newer. APIs that are newer than your Xcode are left out at compile time and report "unavailable" instead of breaking the build.
Requirements
- iOS
- React Native 0.80 or newer with the New Architecture
react-native-nitro-modules0.37 or newer- Xcode 26.0 or newer
- With Expo, a development build (Expo Go isn't supported)
Upgrading from v6
-
Turn on the New Architecture and install
react-native-nitro-modules. -
Modifiers are no longer props. Move them into the
modifiersprop:// v6 <Text font="title" padding={12}>Hello</Text> // v7 <Text modifiers={compose().font('title').padding(12)}>Hello</Text>
-
Props follow SwiftUI's initializers. For example,
ButtontakesonPressand its label as children, andTextFieldtakes its placeholder as children:<TextField text={name}>Name</TextField> <Button onPress={save}>Save</Button>
Since 7.0.0-beta.2
- Documentation in the types is no longer cut off mid-sentence, so editor hovers show Apple's full text.
Thank you
Thanks to @andrew-levy for creating swiftui-react-native, and to everyone who tried the betas and reported issues.
Full changelog: v6.3.0...v7.0.0