This is documentation for the next SDK version. For up-to-date documentation, see the latest version (SDK 54).
A SwiftUI Divider component for creating visual separators.
iOS
tvOS
A visual element that can be used to separate other content.
Installation
Terminal
-
npx expo install @expo/ui
If you are installing this in an existing React Native app, make sure to install expo
in your project.
Usage
import { Divider, Host, VStack, Text } from '@expo/ui/swift-ui'; function DividerExample() { return ( <Host style={{ flex: 1 }}> <VStack> <Text>First section</Text> <Divider /> <Text>Second section</Text> <Divider /> <Text>Third section</Text> </VStack> </Host> ); }
See Official SwiftUI documentation for more information.
API
Component
Type: React.Element<CommonViewModifierProps>
Divider component uses the native Divider component. A visual element that can be used to separate other content.