{"id":28519379,"url":"https://github.com/mgcrea/react-native-swiftui","last_synced_at":"2026-02-09T11:20:39.918Z","repository":{"id":281037095,"uuid":"944001527","full_name":"mgcrea/react-native-swiftui","owner":"mgcrea","description":"SwiftUI components for React Native","archived":false,"fork":false,"pushed_at":"2026-02-01T10:41:57.000Z","size":2041,"stargazers_count":20,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-02-01T16:08:03.952Z","etag":null,"topics":["react-native","swiftui"],"latest_commit_sha":null,"homepage":"https://mgcrea.github.io/react-native-swiftui/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgcrea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-06T16:10:29.000Z","updated_at":"2026-02-01T10:42:01.000Z","dependencies_parsed_at":"2025-04-11T11:04:16.590Z","dependency_job_id":"2c8425f9-5c22-46fc-a593-839211ff19f3","html_url":"https://github.com/mgcrea/react-native-swiftui","commit_stats":null,"previous_names":["mgcrea/react-native-swiftui"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/mgcrea/react-native-swiftui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgcrea%2Freact-native-swiftui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgcrea%2Freact-native-swiftui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgcrea%2Freact-native-swiftui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgcrea%2Freact-native-swiftui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgcrea","download_url":"https://codeload.github.com/mgcrea/react-native-swiftui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgcrea%2Freact-native-swiftui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29262992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T04:11:57.159Z","status":"ssl_error","status_checked_at":"2026-02-09T04:11:56.117Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react-native","swiftui"],"created_at":"2025-06-09T06:07:11.751Z","updated_at":"2026-02-09T11:20:39.888Z","avatar_url":"https://github.com/mgcrea.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD033 --\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://mgcrea.github.io/react-native-swiftui\"\u003e\n    \u003cimg src=\"./.github/assets/logo.png\" alt=\"logo\" width=\"480\" height=\"300\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@mgcrea/react-native-swiftui\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/@mgcrea/react-native-swiftui.svg?style=for-the-badge\" alt=\"npm version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@mgcrea/react-native-swiftui\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dt/@mgcrea/react-native-swiftui.svg?style=for-the-badge\" alt=\"npm total downloads\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@mgcrea/react-native-swiftui\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/@mgcrea/react-native-swiftui.svg?style=for-the-badge\" alt=\"npm monthly downloads\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@mgcrea/react-native-swiftui\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/l/@mgcrea/react-native-swiftui.svg?style=for-the-badge\" alt=\"npm license\" /\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"https://github.com/mgcrea/react-native-swiftui/actions/workflows/main.yaml\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/mgcrea/react-native-swiftui/main.yaml?style=for-the-badge\u0026branch=main\" alt=\"build status\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://depfu.com/github/mgcrea/react-native-swiftui\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/dependencies-none-brightgreen?style=for-the-badge\" alt=\"dependencies status\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003c!-- markdownlint-enable MD033 --\u003e\n\n## Overview\n\nNative SwiftUI components for React Native using the Fabric renderer. Build iOS forms and interfaces with SwiftUI's declarative syntax while maintaining a familiar React workflow.\n\n## Features\n\n- **🍎 Native SwiftUI** - Real SwiftUI components, not web views or custom drawings\n- **🔧 No Dependencies** - Safe from supply chain attacks\n- **⚡ Fabric Renderer** - Built on React Native's modern architecture\n- **📝 TypeScript-first** - Full type safety and autocomplete support\n- **🔄 Two-Way Binding** - State syncs between JavaScript and SwiftUI\n- **📋 Form Components** - TextField, Picker, DatePicker, Toggle, Stepper, Slider\n- **📐 Layout Components** - Form, Section, HStack, VStack, ZStack, Spacer\n- **🎨 SF Symbols** - Full SF Symbol support with rendering modes and variable values\n- **📱 Sheet Presentation** - Native modal sheets with detent support\n- **🔌 Form Libraries** - Works with react-hook-form, TanStack Form, and more\n\n\u003e **Note:** This library is iOS-only. For Android, check out [@mgcrea/react-native-jetpack-compose](https://github.com/mgcrea/react-native-jetpack-compose).\n\n## Demo\n\n![demo](./.github/assets/demo.gif)\n\nTry it yourself with the [Rxd AppStore application](https://apps.apple.com/fr/app/rxd/id6745904823?l=en-GB)\n\n## Quick Start\n\n### Installation\n\n```bash\nnpm install @mgcrea/react-native-swiftui\n# or\npnpm add @mgcrea/react-native-swiftui\n# or\nyarn add @mgcrea/react-native-swiftui\n```\n\n### Requirements\n\n- React Native 0.78.0+ (New Architecture required)\n- iOS 15.1+\n\n### Basic Usage\n\n```tsx\nimport { SwiftUI } from \"@mgcrea/react-native-swiftui\";\nimport { useState } from \"react\";\nimport { View } from \"react-native\";\n\nexport function ProfileForm() {\n  const [name, setName] = useState(\"\");\n  const [active, setActive] = useState(false);\n\n  return (\n    \u003cView style={{ flex: 1 }}\u003e\n      \u003cSwiftUI style={{ flex: 1 }}\u003e\n        \u003cSwiftUI.Form\u003e\n          \u003cSwiftUI.Section header=\"Profile\"\u003e\n            \u003cSwiftUI.TextField label=\"Name\" text={name} onChange={setName} /\u003e\n            \u003cSwiftUI.Toggle label=\"Active\" isOn={active} onChange={setActive} /\u003e\n          \u003c/SwiftUI.Section\u003e\n        \u003c/SwiftUI.Form\u003e\n      \u003c/SwiftUI\u003e\n    \u003c/View\u003e\n  );\n}\n```\n\n## How It Works\n\nSwiftUI components register themselves in a virtual tree that's rendered natively:\n\n1. **React renders JSX** - Components return `null`, registering nodes in a tree\n2. **Tree serialization** - The view tree is passed to native code as JSON\n3. **SwiftUI renders** - Native SwiftUI renders the entire tree\n4. **Events bridge back** - User interactions trigger React callbacks\n\nThis means 60fps native performance with no JavaScript layout overhead.\n\n## Documentation\n\n📚 **[Full Documentation](https://mgcrea.github.io/react-native-swiftui/)**\n\n- **[Getting Started](https://mgcrea.github.io/react-native-swiftui/getting-started/installation/)** - Installation and setup\n- **[Components](https://mgcrea.github.io/react-native-swiftui/components/overview/)** - SwiftUI tree components\n- **[Standalone](https://mgcrea.github.io/react-native-swiftui/standalone/sfsymbol/)** - Native components like SFSymbol\n- **[Guides](https://mgcrea.github.io/react-native-swiftui/guides/styling/)** - Styling, events, and form integration\n- **[Examples](https://mgcrea.github.io/react-native-swiftui/examples/basic-form/)** - Complete working examples\n\n## Contributing\n\nContributions are welcome! To run the example project:\n\n```bash\ngit clone https://github.com/mgcrea/react-native-swiftui.git\ncd react-native-swiftui\npnpm install\npnpm run codegen:ios\n\ncd example\npnpm install\npnpm run install:ios\npnpm run ios\n```\n\n## Credits\n\n- [SwiftUI](https://developer.apple.com/xcode/swiftui/) - Apple's declarative UI framework\n- [React Native](https://reactnative.dev/) - Build native apps using React\n\n## Authors\n\n- [Olivier Louvignes](https://github.com/mgcrea) - [@mgcrea](https://twitter.com/mgcrea)\n\n```text\nMIT License\n\nCopyright (c) 2025 Olivier Louvignes \u003colivier@mgcrea.io\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgcrea%2Freact-native-swiftui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgcrea%2Freact-native-swiftui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgcrea%2Freact-native-swiftui/lists"}