Skip to content

<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 ​

PropTypeDefaultDescription
direction"row" | "column" | "row-reverse" | "column-reverse"'column'Main axis: children stacked (column) or side by side (row).
wrapbooleanWrap children onto more lines when they do not fit.
uiRecord<string, unknown>{}Escape hatch: raw uikit (@pmndrs/uikit) properties, merged last.
distancenumberOnly for a root box: the reading distance in metres, which sets its world scale.
gapSpaceValueSpace between children: a step on the theme's spacing scale (0..8), or "12px" in dmm.
paddingSpaceValueSpace 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).
grownumberShare of the parent's free space to take (CSS flex-grow).
widthSizeWidth in dmm, a percentage of the parent ("50%"), or auto.
heightSizeHeight in dmm, a percentage of the parent, or auto.

MIT License