Center
Center child content in an Astryx container.
Astryx Props
JSON-safe Center props forwarded to Astryx.
Supported Astryx props include:
axis('both' or 'horizontal' or 'vertical'): Which direction(s) to center.width(number or string): Container width (px or CSS value).height(number or string): Container height (px or CSS value).isInline(boolean): Use inline-flex (useful for text/icons).children(ReactNode): Content to center.xstyle(StyleXStyles): StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.
Props typed as React nodes, render functions, event handlers, refs, or StyleX styles are documented for Astryx parity but cannot be serialized directly from Python unless the wrapper adapts them.
See Astryx component docs: https://astryx.atmeta.com/components/Center.
Functions
constructor__init__(children=None, *, axis='both', width=None, height=None, inline=None, **props) -> NoneparamchildrenChildInput= NoneChild widget, sequence of widgets, or mapping of slot names to widgets.
paramaxisstr= 'both'Axis used for centering child content.
paramwidthint | float | str | None= NoneContainer width.
paramheightint | float | str | None= NoneContainer height.
paraminlinebool | None= NoneWhether to use inline-flex layout.
parampropsAny= {}Returns
None