GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing docs.nativebase.io — Divider | NativeBase | Universal Components for React and React Native

Divider | NativeBase | Universal Components for React and React Native

NativeBase
3.4.x
🎉 Prompt to React Native UI
→
Search
⌘
K
Hire us
NativeBase
Introduction
Getting Started
Installation
Setup NativeBase Provider
Migration
Upgrading to v3
Upgrading to 3.2.0 from 3.x
Upgrading to 3.4.0 from 3.3.x
Components Migration
ActionSheet
Badge
Button
Card
Checkbox
DatePicker
DeckSwiper
Drawer
FABs
FooterTab
Form
Header
Icon
Layout
Picker
Radio Button
Searchbar
Segment
Spinner
SwipeList
Tabs
Thumbnail
Toast
Typography
Resources
Contribution
Creating a Universal App with NativeBase and Solito
Core Concepts
Utility First
Utility Props Specificity
Design Tokens
Pseudo Props: Overview
Pseudo Props: Dos & Don'ts
Internal Pseudo Props
Responsive
Features
Utility Props
Color mode (Dark Mode)
NativeBase Factory
SafeAreaView Props
Strict Mode
Accessibility
Theme
Default Theme
Customizing Theme
Customizing Fonts
Customizing Components
Making components dark mode compatible
Breakpoints
Using Theme
TypeScript
Layout
AspectRatio
Box
Center
Container
Flex
HStack / Row
Stack
VStack / Column
ZStack
Forms
Button
Pressable
Checkbox
FormControl
IconButton
Input
Link
Radio
Select
Slider
Switch
TextArea
Data Display
Badge
Divider
Feedback
Alert
Progress
Skeleton
Spinner
Toast
Typography
Text
Heading
Overlay
AlertDialog
Menu
Modal
Popover
Tooltip
Disclosure
ActionSheet
Media and Icons
Avatar
Icon
Image
Transition
PresenceTransition
Slide
Stagger
Others
Fab
Hidden
ReactNative Components
ScrollView
View
KeyboardAvoidingView
StatusBar
FlatList
SectionList
Hooks
useDisclose
useBreakpointValue
useClipboard
useMediaQuery
useTheme
useToken
useColorMode
useColorModeValue
useContrastText
useAccessibleColors
Examples
Todo-List
Kitchen Sink
Recipes
Designs
AppBar
Card
Drawer Navigation
Tab View
Swipe List
Forms
Form with Validation
Login/Signup Forms
SearchBar
Layout
App Drawer
Footer
More
Changelog
Testing
FAQ's
More Props
If you are starting a new project, please try gluestack-ui for better performance and new design.
Divider
Divider can visually separate content in a given list or group.
Show Code
Playground
const Example = () => {
return <Box alignItems="center">
<Flex direction="row" h="58" p="4">
<Text>Simple</Text>
<Divider bg="emerald.500" thickness="2" mx="2" orientation="vertical" />
<Text>Easy</Text>
<Divider bg="amber.500" thickness="2" mx="2" orientation="vertical" />
<Text>Beautiful</Text>
</Flex>
</Box>;
};
Import
Copy
import { Divider } from 'native-base';
Examples
Basic
The Divider displays a thin horizontal or vertical line.
Playground
const Example = () => {
return <Box alignItems="center">
<Box w="140">
<Heading mx="3" alignItems="center" flexDirection="row">
Chrome
</Heading>
<Divider my="2" _light={{
bg: "muted.800"
}} _dark={{
bg: "muted.50"
}} />
<Heading mx="3" alignItems="center" flexDirection="row">
Firefox
</Heading>
</Box>
</Box>;
};
Divider Orientation
Pass the orientation prop and set it to either horizontal or vertical.
Note: If the horizontal orientation is used, make sure that the parent element is assigned a width. If the vertical orientation is used, make sure that the parent element is assigned a height.
Playground
const Example = () => {
return <Box alignItems="center">
<Box w="160">
<Heading mx="auto">Shoes</Heading>
<Divider my="2" _light={{
bg: "muted.800"
}} _dark={{
bg: "muted.50"
}} />
<Flex mx="3" direction="row" justify="space-evenly" h="60">
<Heading py="2">Girls</Heading>
<Divider orientation="vertical" mx="3" _light={{
bg: "muted.800"
}} _dark={{
bg: "muted.50"
}} />
<Heading py="2">Boys</Heading>
</Flex>
</Box>
</Box>;
};
Composition
You can use bg or backgroundColor to change the divider's color and width and height to change its width and height respectively.
Playground
const Example = () => {
return <Box alignItems="center">
<Flex direction="row" h="58" p="4">
<Text>Simple</Text>
<Divider bg="emerald.500" thickness="2" mx="2" orientation="vertical" />
<Text>Easy</Text>
<Divider bg="indigo.500" thickness="2" mx="2" orientation="vertical" />
<Text>Beautiful</Text>
</Flex>
</Box>;
};
Props
Divider implements
View
,
SafeAreaProps
,
PlatformProps
,
FlexProps
,
ColorProps
,
LayoutProps
,
BorderProps
,
TypographyProps
,
ShadowProps
,
PositionProps
orientation
The orientation of the divider.
Type: "horizontal" | "vertical"
thickness
The thickness of the divider.
Type: SpaceType
Styling
NativeBase ships with a default theme for each component. Check out the default theme of the divider
here
.
Info: We can easily extend the divider component theme using extendTheme function as described in the documentation
here
.
Accessibility
Divider has role set to separator and aria-orientation to either horizontal or vertical.
Previous
Badge
Next
Alert
Quick Nav
Import
Examples
Basic
Divider Orientation
Composition
Props
Styling
Accessibility
MadeWithNativeBase
gluestack-ui
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.