Skip to main content

Space

Spacing between layout controls.

Basic usage​

Basic usage
import { LhSpace } from '@lh-ui/react'

export default function Demo() {
return (
<LhSpace size="large">
<span>Item one</span>
<span>Item two</span>
<span>Item three</span>
</LhSpace>
)
}

Space Props​

PropDescriptionTypeOptionsDefault
directionArrangement direction'horizontal' | 'vertical'—'horizontal'
sizeSpacing'small' | 'medium' | 'large' | number | [number, number]—'medium'
wrapWhether to wrap (effective horizontally only)boolean—true
alignmentAlignment (align-items)'start' | 'center' | 'end' | 'baseline'—'start'
sxLayout shorthandSxProps——
Spacing implementation

Spacing is entirely handled by native CSS gap: presets map to --lh-spacing-* tokens (small=8 / medium=16 / large=24), numbers are treated as px, and an array [horizontal, vertical] controls the two axes separately. The component does not wrap its children, so there is no SpaceItem.

Styles​

import '@lh-ui/react/style/space'