✨ Announcing our seed funding led by Lux Capital! Read more about it on our blog
DocsBlogChangelog

Search documentation...

/

Star

12k+

[ Learn ]

[ Concepts ]

[ Reference ]

Center


Center, Square, and Circle are components that center its children within itself.

Hello World!

rx.center(
    rx.text("Hello World!"),
    border_radius="15px",
    border_width="thick",
    width="50%",
)
Below are examples of circle and sqaure.

Square

Circle

rx.hstack(
    rx.square(
        rx.vstack(rx.text("Square")),
        border_width="thick",
        border_color="purple",
        padding="1em",
    ),
    rx.circle(
        rx.vstack(rx.text("Circle")),
        border_width="thick",
        border_color="orange",
        padding="1em",
    ),
    spacing="2em",
)

Center


A box that centers its contents.


  • No props for Center.

  • Base Event Triggers

Circle


A square container with round border-radius.


  • No props for Circle.

  • Base Event Triggers

Square


A centered square container.


  • No props for Square.

  • Base Event Triggers

← BoxCond →

Copyright © 2023 Pynecone, Inc.