Skip to content

Space

Demo

Space 跨端示例与演示

Order filtersWrap tags and stack full-width actions

Current:All

Basic Usage

vue
<template>
  <VSpace>
    <VButton size="sm">Button</VButton>
    <VButton size="sm">Button</VButton>
  </VSpace>
</template>

Direction and Size

vue
<template>
  <VSpace direction="vertical" :size="[8, 12]">
    <VButton size="sm">Button</VButton>
    <VButton size="sm">Button</VButton>
  </VSpace>
</template>

Wrap and Fill

vue
<template>
  <VSpace :size="8" wrap>
    <VButton size="sm">Button</VButton>
    <VButton size="sm">Button</VButton>
    <VButton size="sm">Button</VButton>
  </VSpace>
</template>

Props

PropTypeDefaultDescription
direction'horizontal' | 'vertical''horizontal'Space direction
sizenumber | string | [number | string, number | string]undefinedGap size
align'start' | 'end' | 'center' | 'baseline' | 'stretch''start'Cross-axis alignment
justify'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly''start'Main-axis alignment
wrapbooleanfalseWhether to wrap
fillbooleanfalseWhether children fill width