Reflex Logo

Intro

Gallery

Hosting

Learn

Components

Recipes

API Reference

Onboarding

Library

/

Layout

/

Center

Center is a component that centers its children within itself. It is based on the flex component and therefore inherits all of its props.

Hello World!

rx.center(
    rx.text("Hello World!"),
    border_radius="15px",
    border_width="thick",
    width="50%",
)

A center component.

Test
PropTypeDefault ValueValues
as_child
bool
direction
Union[Literal, Breakpoints]
align
Union[Literal, Breakpoints]
justify
Union[Literal, Breakpoints]
wrap
Union[Literal, Breakpoints]
spacing
Union[Literal, Breakpoints]

Event Triggers

See the full list of default event triggers
← CardContainer →

Did you find this useful?

HomeGalleryChangelogIntroductionHosting