Section
Render an Astryx section container.
Astryx Props
JSON-safe Section props forwarded to Astryx.
Supported Astryx props include:
variant('section' or 'transparent' or 'muted'): Background variant applied to the section container.width(SizeValue): Width of the section; a number is interpreted as pixels, a string is used as-is.height(SizeValue): Height of the section; a number is interpreted as pixels, a string is used as-is.maxWidth(SizeValue): Maximum width of the section.minHeight(SizeValue): Minimum height of the section.children(ReactNode): Content rendered inside the section.dividers(Array<'top' or 'bottom' or 'start' or 'end'>): Which sides of the section have divider borders.padding(SpacingStep): Internal padding using the spacing scale (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10). Use padding={0} for edge-to-edge content.paddingBlock(SpacingStep): Block (vertical) padding override. Overrides only the block-axis padding while preserving inline padding from 'padding' or the container theme default. Accepts the spacing scale (0, 0.5, 1, 1.5, 2, 3, 4, 5, 6, 8, 10).xstyle(StyleXStyles): StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object.
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/Section.
Functions
constructor__init__(children=None, *, variant='section', padding=None, padding_block=None, dividers=None, width=None, height=None, max_width=None, **props) -> NoneparamchildrenChildInput= NoneChild widget, sequence of widgets, or mapping of slot names to widgets.
paramvariantstr= 'section'Astryx visual variant.
parampaddingint | float | None= NoneInner padding using the Astryx spacing scale.
parampadding_blockint | float | None= NoneBlock-axis padding override.
paramdividersIterable[str] | None= NoneSection sides that display divider borders.
paramwidthint | float | str | None= NoneSection width.
paramheightint | float | str | None= NoneSection height.
parammax_widthint | float | str | None= NoneMaximum section width.
parampropsAny= {}Returns
None