You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below is a list of components currently supported by `@mgcrea/react-native-swiftui`. These components leverage SwiftUI's native iOS capabilities while being controlled via React Native's JSX syntax.
|`Button`| A clickable button with customizable styles |`title`, `buttonStyle`, `disabled`, `style`, `onPress`| Supports styles like `default`, `plain`, `bordered`, etc. |
135
+
|`DatePicker`| A date/time selection picker |`selection`, `label`, `datePickerStyle`, `displayedComponents`, `onChange`| Options include `compact`, `wheel`, etc.; supports `date`, `hourAndMinute` components |
136
+
|`Form`| A container for grouping form elements | Children (nested components) | No specific props; acts as a layout container |
137
+
|`Group`| A logical grouping of views | Children (nested components) | No specific props; used for hierarchy organization |
138
+
|`HStack`| Horizontal stack layout |`alignment`, `spacing`, `style`, Children | Alignments: `top`, `center`, `bottom`, etc. |
139
+
|`Image`| Displays an image (named, system, or local) |`name`, `source`, `sourceUri`, `resizeMode`, `style`| Supports `system:` prefix for SF Symbols, asset names, and bundled assets via `require`|
140
+
|`Picker`| A dropdown or segmented selection |`options`, `selection`, `label`, `pickerStyle`, `onChange`| Styles: `menu`, `segmented`, `wheel`, etc. |
141
+
|`Rectangle`| A simple rectangular shape |`style`| Used for basic shapes with customizable styling |
142
+
|`Section`| A collapsible section within a form |`header`, `footer`, `isCollapsed`, Children | Useful for organizing form content |
143
+
|`Sheet`| A modal sheet presentation |`isPresented`, `detents`, `onDismiss`, Children | Detents: `medium`, `large`, or custom values |
144
+
|`Slider`| A continuous value slider |`value`, `minimum`, `maximum`, `step`, `label`, `onChange`| Adjustable range with step increments |
145
+
|`Spacer`| A flexible space filler |`minLength`| Expands to fill available space |
146
+
|`Stepper`| An increment/decrement control |`value`, `label`, `minimum`, `maximum`, `step`, `onChange`| For numeric adjustments |
|`TextField`| An editable text input |`text`, `label`, `placeholder`, `keyboardType`, `onChange`| Supports various keyboard types and text content types |
149
+
|`Toggle`| A switch for boolean values |`isOn`, `label`, `onChange`| Simple on/off control |
-**Image Sources**: The `Image` component supports:
159
+
- Named assets from `Assets.xcassets` (e.g., `name="logo"`).
160
+
- System images with a `system:` prefix (e.g., `name="system:star.fill"`).
161
+
- Local bundled assets via `source={require('../path/to/image.png')}`.
162
+
108
163
## How It Works
109
164
110
165
1.**Component-Level Tree Building**: Each `SwiftUI.*` component (e.g., `<SwiftUI.TextField>`) registers itself with a `viewTree` during React’s render phase, using a context-based system.
0 commit comments