<XrBox>
A transparent flex container, the <div> of vue-xr-ui.
Usage
vue
<XrBox direction="row" justify="space-between" align="center" :gap="3">
<XrText variant="label">Volume</XrText>
<XrSlider v-model="volume" :ui="{ flexGrow: 1 }" />
</XrBox>API
Props
| Prop | Type | Default | Description |
|---|---|---|---|
direction | "row" | "column" | "row-reverse" | "column-reverse" | 'column' | Main axis: children stacked (column) or side by side (row). |
wrap | boolean | Wrap children onto more lines when they do not fit. | |
ui | Record<string, unknown> | {} | Escape hatch: raw uikit (@pmndrs/uikit) properties, merged last. |
distance | number | Only for a root box: the reading distance in metres, which sets its world scale. | |
gap | SpaceValue | Space between children: a step on the theme's spacing scale (0..8), or "12px" in dmm. | |
padding | SpaceValue | Space inside the edges: a spacing step, or "12px". | |
align | "flex-start" | "center" | "flex-end" | "stretch" | "baseline" | Cross-axis alignment of the children (CSS align-items). | |
justify | "flex-start" | "center" | "flex-end" | "space-between" | "space-around" | "space-evenly" | Main-axis distribution of the children (CSS justify-content). | |
grow | number | Share of the parent's free space to take (CSS flex-grow). | |
width | Size | Width in dmm, a percentage of the parent ("50%"), or auto. | |
height | Size | Height in dmm, a percentage of the parent, or auto. |