Function vertical

Creates a vertical layout component that arranges content in a column.

Either the content to display or the options object

Configuration object

if true, the flex property will be set to 1

align-items property - default is 'stretch'

justify-content property - default is 'flex-start'

Spacing between items in pixels

Padding around the container in pixels (number or array of numbers)

Margin around the container in pixels (number or array of numbers)

Width of the container (default: 'auto')

Custom CSS styles to apply to the container

The content to display (only used when options are provided)

A JSX element representing the vertical layout component

Basic usage with content

vertical([
inputField({
name: 'firstName',
label: 'First name',
defaultValue: 'Jane',
}),
inputField({
name: 'lastName',
label: 'Last name',
defaultValue: 'Doe',
}),
]);

Usage with options and content

vertical(
{
gap: 8,
align: 'center',
justify: 'space-between',
padding: 16,
},
[
inputField({
name: 'email',
label: 'Email',
type: 'email',
}),
inputField({
name: 'phone',
label: 'Phone',
type: 'tel',
}),
]
);