Skip to main content

Divider

Divider component render a separator that can separate two components horizontally and vertically.

Implementation code

import { StyledView, StyledText, Divider } from '@nexara/nativeflow';

const Component = () => {
return (
<StyledView gap={20}>
<StyledText primary>Item 1</StyledText>
<Divider />
<StyledText primary>Item 2</StyledText>
</StyledView>

<StyledView gap={20} flexDirection='row'>
<StyledText primary>Item 1</StyledText>
<Divider />
<StyledText primary>Item 2</StyledText>
</StyledView>
);
}
export default Component;

Divider Props

PropTypeDefaultDescription
thicknessnumber0.7Sets the thickness of the divider line.
colorstringSets the color of the divider line; falls back to theme's subtle border color if not provided.
styleStyleProp<ViewStyle>Custom styles to apply to the divider.