Reflex Logo
Docs Logo
Library

/

Layout

/

Stack

Stack is a layout component used to group elements together and apply a space between them.

vstack is used to stack elements in the vertical direction.

hstack is used to stack elements in the horizontal direction.

stack is used to stack elements in the vertical or horizontal direction.

These components are based on the flex component and therefore inherit all of its props.

The stack component can be used with the flex_direction prop to set to either row or column to set the direction.

Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example

Saving Money

Saving money is an art that combines discipline, strategic planning, and the wisdom to foresee future needs and emergencies. It begins with the simple act of setting aside a portion of one's income, creating a buffer that can grow over time through interest or investments.

Spending Money

Spending money is a balancing act between fulfilling immediate desires and maintaining long-term financial health. It's about making choices, sometimes indulging in the pleasures of the moment, and at other times, prioritizing essential expenses.

API Reference

rx.stack

A stack component.

PropType | ValuesDefaultInteractive
access_key
str
-
auto_capitalize
"off" | "none" | ...
-
content_editable
Union["inherit" | "plaintext-only", bool]
-
context_menu
str
-
dir
str
-
draggable
bool
-
enter_key_hint
"enter" | "done" | ...
-
hidden
bool
-
input_mode
"none" | "text" | ...
-
item_prop
str
-
lang
str
-
role
"alert" | "alertdialog" | ...
-
slot
str
-
spell_check
bool
-
tab_index
int
-
title
str
-
as_child
bool
-
direction
"row" | "column" | ...
-
align
"start" | "center" | ...
-
justify
"start" | "center" | ...
-
wrap
"nowrap" | "wrap" | ...
-
spacing
"0" | "1" | ...
-

rx.hstack

A horizontal stack component.

PropType | ValuesDefaultInteractive
access_key
str
-
auto_capitalize
"off" | "none" | ...
-
content_editable
Union["inherit" | "plaintext-only", bool]
-
context_menu
str
-
dir
str
-
draggable
bool
-
enter_key_hint
"enter" | "done" | ...
-
hidden
bool
-
input_mode
"none" | "text" | ...
-
item_prop
str
-
lang
str
-
role
"alert" | "alertdialog" | ...
-
slot
str
-
spell_check
bool
-
tab_index
int
-
title
str
-
as_child
bool
-
direction
"row" | "column" | ...
-
align
"start" | "center" | ...
-
justify
"start" | "center" | ...
-
wrap
"nowrap" | "wrap" | ...
-
spacing
"0" | "1" | ...
-

rx.vstack

A vertical stack component.

PropType | ValuesDefaultInteractive
access_key
str
-
auto_capitalize
"off" | "none" | ...
-
content_editable
Union["inherit" | "plaintext-only", bool]
-
context_menu
str
-
dir
str
-
draggable
bool
-
enter_key_hint
"enter" | "done" | ...
-
hidden
bool
-
input_mode
"none" | "text" | ...
-
item_prop
str
-
lang
str
-
role
"alert" | "alertdialog" | ...
-
slot
str
-
spell_check
bool
-
tab_index
int
-
title
str
-
as_child
bool
-
direction
"row" | "column" | ...
-
align
"start" | "center" | ...
-
justify
"start" | "center" | ...
-
wrap
"nowrap" | "wrap" | ...
-
spacing
"0" | "1" | ...
-

Built with Reflex