VStack aligns items vertically. Column is also an alias for VStack.
function Example() {
return <VStack space={4} alignItems="center">
<Center w="64" h="10" bg="indigo.200" rounded="md" shadow={3} />
<Center w="64" h="10" bg="indigo.300" rounded="md" shadow={3} />
<Center w="64" h="10" _dark={{
bg: 'indigo.500'
}} _light={{
bg: 'indigo.400'
}} rounded="md" shadow={3} />
</VStack>;
}
import { VStack } from 'native-base';
function Example() {
return <VStack space={4} alignItems="center">
<Center w="64" h="20" bg="indigo.300" rounded="md" shadow={3} />
<Center w="64" h="20" bg="indigo.500" rounded="md" shadow={3} />
<Center w="64" h="20" bg="indigo.700" rounded="md" shadow={3} />
</VStack>;
}
VStack implements
,
,
,
,
,
,
,
,
,
The direction of the Stack Items.
Type: ResponsiveValue<"row" | "column" | "column-reverse" | "row-reverse">