Skip to main content

Divider

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

Example banner

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;

Props

PropTypeDefaultDescription
thicknessnumber0.2It sets the thickness of the border
colorstringIt sets the color of the divider (falls back to theme if not provided)
styleStyleProp<ViewStyle> Helps to change the styles of the divider