React Native / Core
Divider
Hairline separator. Decorative, so screen readers skip it.
import { Divider } from "@stylhero/native";
Example
import { View } from "react-native";
import { Divider, Text } from "@stylhero/native";
function DividerExample() {
return (
<View>
<Text>Parts</Text>
<Divider spacing={3} />
<Text>Benchmarks</Text>
</View>
);
}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
inset |
SpacingToken |
- | Indent from the start edge (spacing token), e.g. to line up with list text after an avatar. |
spacing |
SpacingToken |
- | Space on both sides of the line (spacing token). |
style |
StyleProp<ViewStyle> |
- | |
testID |
string |
- | |
vertical |
boolean |
- | A vertical line, e.g. between items in a row. |
Types
type SpacingToken = keyof typeof spacing;
Accessibility
- Hidden from screen readers.
Generated from src/components/Divider.tsx. Something wrong or missing? Open an issue.