Skip to content

Step Steps ​

Shows the steps of a task.

Basic Usage ​

Basic usage. The component automatically determines the state of each step based on the current value.

Completed
Description of this step
In Progress
Description of this step
Pending
Description of this step
Pending
Description of this step
<template>
  <div>
    <b-steps :current="current">
      <b-step title="Completed" content="Description of this step"></b-step>
      <b-step title="In Progress" content="Description of this step"></b-step>
      <b-step title="Pending" content="Description of this step"></b-step>
      <b-step title="Pending" content="Description of this step"></b-step>
    </b-steps>
    <b-button type="primary" @click="next">Next Step</b-button>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const current = ref(0)

function next() {
  if (current.value === 3) {
    current.value = 0
  } else {
    current.value += 1
  }
}
</script>

Small Steps ​

Set size="small" to display small steps

Completed
进Row中
待进Row
待进Row
<template>
  <div>
    <b-steps :current="current" size="small">
      <b-step title="Completed"></b-step>
      <b-step title="进Row中"></b-step>
      <b-step title="待进Row"></b-step>
      <b-step title="待进Row"></b-step>
    </b-steps>
    <b-button type="primary" @click="next">下一步</b-button>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const current = ref(0)

function next() {
  if (current.value === 3) {
    current.value = 0
  } else {
    current.value += 1
  }
}
</script>

Customicon ​

Set icon to customize icons

Completed
In Progress
Pending
<template>
  <div>
    <b-steps :current="current">
      <b-step title="Completed" icon="sketch"></b-step>
      <b-step title="In Progress" icon="block"></b-step>
      <b-step title="Pending" icon="Gitlab"></b-step>
    </b-steps>
    <b-button type="primary" @click="next">Next Step</b-button>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const current = ref(0)

function next() {
  if (current.value === 2) {
    current.value = 0
  } else {
    current.value += 1
  }
}
</script>

Vertical Steps ​

Set direction="vertical" to enable vertical steps

Completed
Description of this step
In Progress
Description of this step
Pending
Description of this step
Pending
Description of this step
<template>
  <div>
    <b-steps :current="current" direction="vertical">
      <b-step title="Completed" content="Description of this step"></b-step>
      <b-step title="In Progress" content="Description of this step"></b-step>
      <b-step title="Pending" content="Description of this step"></b-step>
      <b-step title="Pending" content="Description of this step"></b-step>
    </b-steps>
    <b-button type="primary" @click="next">Next Step</b-button>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const current = ref(0)

function next() {
  if (current.value === 3) {
    current.value = 0
  } else {
    current.value += 1
  }
}
</script>

Set Status ​

Basic usage. The component automatically determines the state of each step based on the current value.

Completed
Description of this step
In Progress
Description of this step
Pending
Description of this step
Pending
Description of this step
<template>
  <div>
    <b-steps :current="2" status="error">
      <b-step title="Completed" content="Description of this step"></b-step>
      <b-step title="In Progress" content="Description of this step"></b-step>
      <b-step title="Pending" content="Description of this step"></b-step>
      <b-step title="Pending" content="Description of this step"></b-step>
    </b-steps>
  </div>
</template>

<script setup lang="ts"></script>

Steps Props ​

ParameterDescriptionTypeOptionsDefault
currentCurrent stepNumber—0
statusCurrent step statusStringwait、process、finish、error、successprocess
sizeSizeStringsmall—
directionDirectionStringhorizontal or verticalhorizontal

Step Props ​

ParameterDescriptionTypeOptionsDefault
titleTitleString——
statusCurrent step statusStringwait、process、finish、error、successprocess
contentDetailed content (optional)String——
iconCustom iconString——

Step Slot ​

Event NameDescription
titleTitle
contentDetailed content
iconCustom icon