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 — Stack | NativeBase | Universal Components for React and React Native

Stack | 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.
Stack
Stack aligns items vertically or horizontally based on the direction prop.
Show Code
Playground
//@ts-nocheck
function Example() {
return <Box flex="1">
<ScrollView _contentContainerStyle={{
h: '40',
px: '20px',
mb: '4',
minW: '72'
}}>
<VStack space="2.5" mt="4" px="8">
<Heading size="md">row</Heading>
<Stack direction="row" mb="2.5" mt="1.5" space={3}>
<Center size="16" bg="primary.400" rounded="sm" _text={{
color: 'warmGray.50',
fontWeight: 'medium'
}} shadow={'3'}>
Box 1
</Center>
<Center bg="primary.500" size="16" rounded="sm" _text={{
color: 'warmGray.50',
fontWeight: 'medium'
}} shadow={'3'}>
Box 2
</Center>
<Center size="16" bg="primary.700" rounded="sm" _text={{
color: 'warmGray.50',
fontWeight: 'medium'
}} shadow={'3'}>
Box 3
</Center>
</Stack>
<Divider />
<Heading size="md">column</Heading>
<Stack mb="2.5" mt="1.5" direction="column" space={3}>
<Center size="16" bg="primary.400" rounded="sm" _text={{
color: 'warmGray.50',
fontWeight: 'medium'
}} shadow={'3'}>
Box 1
</Center>
<Center bg="primary.500" size="16" rounded="sm" _text={{
color: 'warmGray.50',
fontWeight: 'medium'
}} shadow={'3'}>
Box 2
</Center>
<Center size="16" bg="primary.700" rounded="sm" _text={{
color: 'warmGray.50',
fontWeight: 'medium'
}} shadow={'3'}>
Box 3
</Center>
</Stack>
<Divider />
<Heading size="md">row-reverse</Heading>
<Stack mb="2.5" mt="1.5" direction="row" reversed space={3}>
<Center size="16" bg="primary.400" rounded="sm" _text={{
color: 'warmGray.50',
fontWeight: 'medium'
}} shadow={'3'}>
Box 1
</Center>
<Center bg="primary.500" size="16" rounded="sm" _text={{
color: 'warmGray.50',
fontWeight: 'medium'
}} shadow={'3'}>
Box 2
</Center>
<Center size="16" bg="primary.700" rounded="sm" _text={{
color: 'warmGray.50',
fontWeight: 'medium'
}} shadow={'3'}>
Box 3
</Center>
</Stack>
<Divider />
<Heading size="md">column-reverse</Heading>
<Stack mb="2.5" mt="1.5" direction="column-reverse" space={3}>
<Center size="16" bg="primary.400" rounded="sm" _text={{
color: 'warmGray.50',
fontWeight: 'medium'
}} shadow={'3'}>
Box 1
</Center>
<Center bg="primary.500" size="16" rounded="sm" _text={{
color: 'warmGray.50',
fontWeight: 'medium'
}} shadow={'3'}>
Box 2
</Center>
<Center size="16" bg="primary.700" rounded="sm" _text={{
color: 'warmGray.50',
fontWeight: 'medium'
}} shadow={'3'}>
Box 3
</Center>
</Stack>
<Divider />
</VStack>
</ScrollView>
</Box>;
}
Example
Playground
//@ts-nocheck
function Example() {
return <ScrollView>
<VStack space="2.5" mt="4" px="8">
<Heading size="md">row</Heading>
<Stack direction="row" mb="2.5" mt="1.5" space={3}>
<Center size="16" bg="primary.400" rounded="sm" _text={{
color: "warmGray.50",
fontWeight: "medium"
}} shadow={"3"}>
Box 1
</Center>
<Center bg="primary.500" size="16" rounded="sm" _text={{
color: "warmGray.50",
fontWeight: "medium"
}} shadow={"3"}>
Box 2
</Center>
<Center size="16" bg="primary.700" rounded="sm" _text={{
color: "warmGray.50",
fontWeight: "medium"
}} shadow={"3"}>
Box 3
</Center>
</Stack>
<Divider />
<Heading size="md">column</Heading>
<Stack mb="2.5" mt="1.5" direction="column" space={3}>
<Center size="16" bg="primary.400" rounded="sm" _text={{
color: "warmGray.50",
fontWeight: "medium"
}} shadow={"3"}>
Box 1
</Center>
<Center bg="primary.500" size="16" rounded="sm" _text={{
color: "warmGray.50",
fontWeight: "medium"
}} shadow={"3"}>
Box 2
</Center>
<Center size="16" bg="primary.700" rounded="sm" _text={{
color: "warmGray.50",
fontWeight: "medium"
}} shadow={"3"}>
Box 3
</Center>
</Stack>
<Divider />
<Heading size="md">row-reverse</Heading>
<Stack mb="2.5" mt="1.5" direction="row" reversed space={3}>
<Center size="16" bg="primary.400" rounded="sm" _text={{
color: "warmGray.50",
fontWeight: "medium"
}} shadow={"3"}>
Box 1
</Center>
<Center bg="primary.500" size="16" rounded="sm" _text={{
color: "warmGray.50",
fontWeight: "medium"
}} shadow={"3"}>
Box 2
</Center>
<Center size="16" bg="primary.700" rounded="sm" _text={{
color: "warmGray.50",
fontWeight: "medium"
}} shadow={"3"}>
Box 3
</Center>
</Stack>
<Divider />
<Heading size="md">column-reverse</Heading>
<Stack mb="2.5" mt="1.5" direction="column-reverse" space={3}>
<Center size="16" bg="primary.400" rounded="sm" _text={{
color: "warmGray.50",
fontWeight: "medium"
}} shadow={"3"}>
Box 1
</Center>
<Center bg="primary.500" size="16" rounded="sm" _text={{
color: "warmGray.50",
fontWeight: "medium"
}} shadow={"3"}>
Box 2
</Center>
<Center size="16" bg="primary.700" rounded="sm" _text={{
color: "warmGray.50",
fontWeight: "medium"
}} shadow={"3"}>
Box 3
</Center>
</Stack>
<Divider />
</VStack>
</ScrollView>;
}
Props
Stack implements
View
,
SafeAreaProps
,
PlatformProps
,
FlexProps
,
ColorProps
,
LayoutProps
,
BorderProps
,
TypographyProps
,
ShadowProps
,
PositionProps
divider
The divider element to use between elements.
Type: Element
space
The space between each stack item. Accepts Responsive values
Type: ResponsiveValue<"sm" | "2xs" | "xs" | "md" | "xl" | "lg" | "2xl" | "gutter" | SpaceType>
reversed
Determines whether to reverse the direction of Stack Items.
Type: boolean
direction
The direction of the Stack Items.
Type: ResponsiveValue<"row" | "column" | "column-reverse" | "row-reverse">
Default: column
isHovered
If true, the Stack will be in hovered state.
Type: boolean
isFocused
If true, the Stack will be focused.
Type: boolean
isDisabled
If true, the Stack will be disabled.
Type: boolean
isInvalid
If true, the Stack will be invalid.
Type: boolean
isReadOnly
If true, prevents the value of the children from being edited. Used with FormControls.
Type: boolean
Previous
HStack / Row
Next
VStack / Column
Quick Nav
Example
Props
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.