AnyLumino
API referenceastryxsurfaces

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) -> None
paramchildrenChildInput
= None

Child widget, sequence of widgets, or mapping of slot names to widgets.

paramaxisstr
= 'both'

Axis used for centering child content.

paramwidthint | float | str | None
= None

Container width.

paramheightint | float | str | None
= None

Container height.

paraminlinebool | None
= None

Whether to use inline-flex layout.

parampropsAny
= {}

Returns

None

On this page