Page History
(this page was created automatically. In case of formatting issues, please visit the official Wiki Page)
Section
Link to Figma: tba
Overview
- Section is a container used to organize and group related UI elements.
- It arranges child components using a vertical or horizontal layout.
- It supports internal scrolling when content exceeds the section’s dimensions.
- It provides loading states via a loader with configurable size and cover background.
- It is a fundamental building block for structured page layouts and nested groups.
...
| Do | Don’t | Article setting(s) | |||
|---|---|---|---|---|---|
Set layout: "vertical" for forms and reading flows. | Force dense forms into a cramped horizontal row. | layout | |||
Add consistent spacing via gapClass. | Manually add inconsistent margins to children. | gapClass | |||
Provide defaultHeight and allow growth with canGrow. | Hard-lock the Section height so content clips. | defaultHeight, canGrow | |||
Enable scrollingEnabled when content can overflow. | Let content push surrounding UI or be cut off. | scrollingEnabled | |||
| Show a loader during async work and size it appropriately. | Leave users with a frozen area and no feedback. | showLoader, hideLoader, loaderSize | |||
Use a subtle loaderCoverBackground that preserves legibility. | Pick a cover color that hides the spinner or content. | loaderCoverBackground, loaderSize | |||
Align content intentionally with alignItemsClass/justifyContentClass. | Rely on default alignment that produces uneven layouts. | alignItemsClass, justifyContentClass | |||
| Name the component clearly for maintainability. | Keep the default generic name in the structure panel. | displayName | Initialize data on mount; clean up on unmount. | Start work late and leak timers/listeners. | events.ON_INIT, events.ON_DESTROY |
Accessibility
- Provide a perceivable busy state using
showLoader/hideLoaderwith an appropriateloaderSize. - Maintain predictable reading order via
elementsandlayout. - Reduce layout shift with
defaultHeightpluscanGrow/canShrink. - Preserve loader legibility using
loaderCoverBackground. - Keep alignment predictable with
alignItemsClassandjustifyContentClass. - Avoid color-only messaging; use the loader state rather than relying solely on
loaderCoverBackground. - Prevent scroll jank and keep focus context stable by enabling
scrollingEnabledwhen content can overflow. - Improve readability by applying adequate interior spacing with
paddingClass.