Reflex Logo

Intro

Gallery

Hosting

Learn

Components

Recipes

API Reference

Onboarding

Library

/

Layout

/

Separator

Visually or semantically separates content.

Section 1
Section 2
rx.flex(
    rx.card("Section 1"),
    rx.divider(),
    rx.card("Section 2"),
    spacing="4",
    direction="column",
    align="center",
)

The size prop controls how long the separator is. Using size="4" will make the separator fill the parent container. Setting CSS width or height prop to "100%" can also achieve this effect, but size works the same regardless of the orientation.

Section 1
Section 2
rx.flex(
    rx.card("Section 1"),
    rx.divider(size="4"),
    rx.card("Section 2"),
    spacing="4",
    direction="column",
)

Setting the orientation prop to vertical will make the separator appear vertically.

Section 1
Section 2
rx.flex(
    rx.card("Section 1"),
    rx.divider(orientation="vertical", size="4"),
    rx.card("Section 2"),
    spacing="4",
    width="100%",
    height="10vh",
)

Visually or semantically separates content.

PropTypeDefault ValueValues
size
Union[Literal, Breakpoints]
"4"
color_scheme
Literal
orientation
Union[Literal, Breakpoints]
decorative
bool

Event Triggers

See the full list of default event triggers
← SectionSpacer →

Did you find this useful?

HomeGalleryChangelogIntroductionHosting