Skip to main content

Common Layout Props

Box, Col, and Row all share the following props for controlling spacing, sizing, and alignment.
These common props let you control layout behavior consistently across Box, Col, and Row without needing to remember different APIs for each.

Card

The root container for widget content. Every widget code starts with a Card component as the outermost wrapper.

Props

When confirm or cancel are provided, the card automatically renders action buttons in the footer. If asForm is true, the confirm button acts as the form submit button.

Box

A generic flex container for arranging child elements in any direction.

Props

In addition to all common layout props, Box accepts:

Col

A vertical flex container. This is a shorthand for Box with a column direction, making it the go-to choice for stacking elements vertically.

Props

Col accepts all common layout props and the same additional props as Box (wrap, size, minSize, maxSize, aspectRatio), except direction, which is always set to column.

Row

A horizontal flex container. This is a shorthand for Box with a row direction, making it the go-to choice for placing elements side by side.

Props

Row accepts all common layout props and the same additional props as Box (wrap, size, minSize, maxSize, aspectRatio), except direction, which is always set to row.
Combine Row with Spacer to push elements to opposite ends of a container — a common pattern for headers, toolbars, and list items.

Spacer

A flexible empty space that expands to fill available room along the main axis. Use it to push sibling elements apart within a Row or Col.

Props


Divider

A horizontal line separator for visually breaking content into sections.

Props


ListView

A scrollable list container for rendering collections of items. Use with ListViewItem to define each entry.

Props

Set limit to control how many items are visible at once. Items beyond the limit become accessible through scrolling, keeping the widget compact.

ListViewItem

An individual item inside a ListView. Items can be made interactive by providing an onClickAction.

Props

When onClickAction is set, the item renders as a clickable element with hover and focus styles applied automatically.