Flutter docs
Default skin

Space

Set consistent spacing between components.

When to use

Use Space for equal horizontal or vertical gaps, wrapping, separators, and compact control groups.

Examples

Basic Usage

Crowded components horizontal spacing.

Vertical Space

Crowded components vertical spacing.

Space Size

Use size to set the spacing. Three sizes are preset: small, medium, large. You can also customize the spacing. If size is not set, the spacing is small.

Align

Config item align.

Wrap

Auto wrap line.

separator

Crowded components separator.

Compact Mode for form component

Compact Mode for form component.

Button Compact Mode

Button component compact example.

Vertical Compact Mode

Vertical Mode for Space.Compact, support Button only.

Custom semantic dom styling

You can customize the semantic dom style of Space by passing objects/functions through classNames and styles.

API

Space, Space.Compact, and their props are exported from @ceebee/ui/client.

Space

PropertyDescriptionTypeDefaultVersion
alignAlign itemsstart | end |center |baseline-4.2.0
classNamesCustomize class for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, string> | (info: { props: SpaceProps })=> Record<SemanticDOM, string>-—
directionThe space directionvertical | horizontalhorizontal4.1.0
orientationThe space directionvertical | horizontalhorizontal—
sizeThe space sizeSize | [Size\[\]](#size)small4.1.0 | Array: 4.9.0
splitSet split, please use separator insteadReactNode-4.7.0
separatorSet separatorReactNode--
stylesCustomize inline style for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, CSSProperties> | (info: { props: SpaceProps })=> Record<SemanticDOM, CSSProperties>-—
verticalOrientation, Simultaneously configure with orientation and prioritize orientationbooleanfalse-
wrapAuto wrap line, when horizontal effectivebooleanfalse4.9.0

Space.Compact

PropertyDescriptionTypeDefaultVersion
blockOption to fit width to its parent\'s widthbooleanfalse4.24.0
directionSet direction of layoutvertical | horizontalhorizontal4.24.0
orientationSet direction of layoutvertical | horizontalhorizontal—
verticalOrientation, Simultaneously configure with orientation and prioritize orientationbooleanfalse-
sizeSet child component sizelarge | medium | smallmedium4.24.0

Space.Addon

PropertyDescriptionTypeDefaultVersion
childrenCustom contentReactNode-5.29.0