Group
A SwiftUI Group component for grouping views without affecting layout.
iOS
tvOS
For the complete documentation index, see llms.txt. Use this Use this file to discover all available pages.
Expo UI Group matches the official SwiftUI Group API and groups views together without introducing additional layout structure.
Installation
Terminal
- npx expo install @expo/uiIf you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Basic group
Groups are useful for applying modifiers to multiple views at once or organizing views without affecting layout.
BasicGroupExample.tsx
import { Host, Group, Text } from '@expo/ui/swift-ui'; import { foregroundStyle } from '@expo/ui/swift-ui/modifiers'; export default function BasicGroupExample() { return ( <Host matchContents> <Group modifiers={[foregroundStyle({ color: 'blue' })]}> <Text>First item</Text> <Text>Second item</Text> <Text>Third item</Text> </Group> </Host> ); }
API
import { Group } from '@expo/ui/swift-ui';
Component
Type: React.Element<GroupProps>
Type:
ReactNode