Reflex Logo

Intro

Gallery

Hosting

Learn

Components

Recipes

API Reference

Onboarding

Library

/

Chakra

/

Layout

/

Stack

Below are two examples the different types of stack components vstack and hstack for ordering items on a page.

Example
Example
Example
Example
Example
rx.chakra.hstack(
    rx.chakra.box(
        "Example", bg="red", border_radius="md", width="10%"
    ),
    rx.chakra.box(
        "Example",
        bg="orange",
        border_radius="md",
        width="10%",
    ),
    rx.chakra.box(
        "Example",
        bg="yellow",
        border_radius="md",
        width="10%",
    ),
    rx.chakra.box(
        "Example",
        bg="lightblue",
        border_radius="md",
        width="10%",
    ),
    rx.chakra.box(
        "Example",
        bg="lightgreen",
        border_radius="md",
        width="60%",
    ),
    width="100%",
)
Example
Example
Example
Example
Example
rx.chakra.vstack(
    rx.chakra.box(
        "Example", bg="red", border_radius="md", width="20%"
    ),
    rx.chakra.box(
        "Example",
        bg="orange",
        border_radius="md",
        width="40%",
    ),
    rx.chakra.box(
        "Example",
        bg="yellow",
        border_radius="md",
        width="60%",
    ),
    rx.chakra.box(
        "Example",
        bg="lightblue",
        border_radius="md",
        width="80%",
    ),
    rx.chakra.box(
        "Example",
        bg="lightgreen",
        border_radius="md",
        width="100%",
    ),
    width="100%",
)

Container to stack elements with spacing.

PropTypeDefault ValueValues
align_items
str
direction
Union[Literal, List]
is_inline
bool
justify_content
str
should_wrap_children
bool
spacing
str
wrap
str
justify
str

Event Triggers

See the full list of default event triggers

Stack items horizontally.

PropTypeDefault ValueValues
align_items
str
direction
Union[Literal, List]
is_inline
bool
justify_content
str
should_wrap_children
bool
spacing
str
wrap
str
justify
str

Stack items vertically.

PropTypeDefault ValueValues
align_items
str
direction
Union[Literal, List]
is_inline
bool
justify_content
str
should_wrap_children
bool
spacing
str
wrap
str
justify
str

Did you find this useful?

HomeGalleryChangelogIntroductionHosting