Reference version

Column

A vertical layout container for universal @expo/ui components.

Android
iOS
Web
Included in Expo Go
Bundled version:
~56.0.2

For the complete documentation index, see llms.txt. Use this file to discover all available pages.

A vertical layout container that arranges its children from top to bottom. Delegates to SwiftUI's VStack on iOS, Jetpack Compose's Column on Android, and a flex View on web.

Installation

Terminal
npx expo install @expo/ui

If you are installing this in an existing React Native app, make sure to install expo in your project.

Usage

Basic column

ColumnExample.tsx
import { Host, Column, Text } from '@expo/ui'; export default function ColumnExample() { return ( <Host matchContents> <Column spacing={8}> <Text>First</Text> <Text>Second</Text> <Text>Third</Text> </Column> </Host> ); }

Alignment

Use alignment to position children along the cross (horizontal) axis.

ColumnAlignmentExample.tsx
import { Host, Column, Text } from '@expo/ui'; export default function ColumnAlignmentExample() { return ( <Host style={{ flex: 1 }}> <Column spacing={8} alignment="center"> <Text>Centered</Text> <Text>Centered</Text> </Column> </Host> ); }

API

import { Column } from '@expo/ui';

Component

Column

Android
iOS
Web

Type: React.Element<ColumnProps>

A vertical layout container that arranges its children from top to bottom.

Props for the Column component, a vertical layout container.

ColumnProps

alignment

Android
iOS
Web
Optional • Literal type: string • Default: 'start'

Cross-axis (horizontal) alignment of children.

Acceptable values are: 'start' | 'center' | 'end'

children

Android
iOS
Web
Optional • Type: ReactNode

Content to render inside the column.

disabled

Android
iOS
Web
Optional • Type: boolean

Whether the component is disabled. Disabled components do not respond to user interaction.

hidden

Android
iOS
Web
Optional • Type: boolean

Whether the component is hidden.

modifiers

Android
iOS
Optional • Type: ModifierConfig[]

Platform-specific modifier escape hatch. Pass an array of modifier configs from @expo/ui/swift-ui/modifiers or @expo/ui/jetpack-compose/modifiers.

onAppear

Android
iOS
Web
Optional • Type: () => void

Called when the component appears on screen.

onDisappear

Android
iOS
Web
Optional • Type: () => void

Called when the component is removed from screen.

onPress

Android
iOS
Web
Optional • Type: () => void

Called when the component is pressed.

spacing

Android
iOS
Web
Optional • Type: number

Vertical spacing between children, in density-independent pixels.

style

Android
iOS
Web
Optional • Type: Pick<ViewStyle, 'padding' | 'paddingHorizontal' | 'paddingVertical' | 'paddingTop' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'backgroundColor' | 'borderRadius' | 'borderWidth' | 'borderColor' | 'opacity' | 'width' | 'height'>

Platform-agnostic style properties. These are translated to SwiftUI modifiers on iOS and Jetpack Compose modifiers on Android.

testID

Android
iOS
Web
Optional • Type: string

Identifier used to locate the component in end-to-end tests.