components/space/index.en-US.md
[email protected] Supported).<code src="./demo/base.tsx">Basic Usage</code> <code src="./demo/vertical.tsx">Vertical Space</code> <code src="./demo/size.tsx">Space Size</code> <code src="./demo/align.tsx">Align</code> <code src="./demo/wrap.tsx">Wrap</code> <code src="./demo/separator.tsx">separator</code> <code src="./demo/compact.tsx">Compact Mode for form component</code> <code src="./demo/compact-buttons.tsx">Button Compact Mode</code> <code src="./demo/compact-button-vertical.tsx">Vertical Compact Mode</code> <code src="./demo/compact-debug.tsx" debug>Input addon debug</code> <code src="./demo/compact-nested.tsx" debug>Nested Space Compact</code> <code src="./demo/debug.tsx" debug>Diverse Child</code> <code src="./demo/gap-in-line.tsx" debug>Flex gap style</code> <code src="./demo/style-class.tsx" version="6.0.0">Custom semantic dom styling</code>
Common props ref:Common props
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
| align | Align items | start | end |center |baseline | - | 4.2.0 |
| classNames | Customize class for each semantic structure inside the component. Supports object or function. | Record<SemanticDOM, string> | (info: { props: SpaceProps })=> Record<SemanticDOM, string> | - | |
| The space direction | vertical | horizontal | horizontal | 4.1.0 | |
| orientation | The space direction | vertical | horizontal | horizontal | |
| size | The space size | Size | Size[] | small | 4.1.0 | Array: 4.9.0 |
Set split, please use separator instead | ReactNode | - | 4.7.0 | |
| separator | Set separator | ReactNode | - | - |
| styles | Customize inline style for each semantic structure inside the component. Supports object or function. | Record<SemanticDOM, CSSProperties> | (info: { props: SpaceProps })=> Record<SemanticDOM, CSSProperties> | - | |
| vertical | Orientation, Simultaneously configure with orientation and prioritize orientation | boolean | false | - |
| wrap | Auto wrap line, when horizontal effective | boolean | false | 4.9.0 |
'small' | 'middle' | 'large' | number
Use Space.Compact when child form components are compactly connected and the border is collapsed. The supported components are:
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
| block | Option to fit width to its parent's width | boolean | false | 4.24.0 |
| Set direction of layout | vertical | horizontal | horizontal | 4.24.0 | |
| orientation | Set direction of layout | vertical | horizontal | horizontal | |
| vertical | Orientation, Simultaneously configure with orientation and prioritize orientation | boolean | false | - |
| size | Set child component size | large | middle | small | middle | 4.24.0 |
This component is available since
[email protected].
Used to create custom cells in compact layouts.
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
| children | Custom content | ReactNode | - | 5.29.0 |
<code src="./demo/_semantic.tsx" simplify="true"></code>
<ComponentTokenTable component="Space"></ComponentTokenTable>