This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
分隔线
用于创建视觉分隔符的 Jetpack Compose 分隔线组件。
Expo UI 提供与官方 Jetpack Compose Divider API 匹配的 HorizontalDivider 和 VerticalDivider。


安装
If you are installing this in an existing React Native app, make sure to install expo in your project.
用法
水平分隔线
一条细水平线,用于在列表和布局中直观地分隔内容。
自定义粗细和颜色
HorizontalDivider 和 VerticalDivider 都接受 thickness 和 color 属性。使用 StyleSheet.hairlineWidth 可绘制单像素线,或设置自定义的粗细和颜色。
垂直分隔线
一条垂直线,用于在横向排列的行布局中分隔并排项目。
API
import { HorizontalDivider, VerticalDivider, } from '@expo/ui/jetpack-compose';
Components
Type: React.Element<ComponentType<DividerCommonConfig>>
A horizontal divider line that groups content in lists and layouts,
matching Compose's HorizontalDivider.
Type: React.Element<ComponentType<DividerCommonConfig>>
A vertical divider line that groups content in layouts,
matching Compose's VerticalDivider.