CSC Design System v4.0.1
VueFlavour Vue React Angular TypeScript
Flavour Vue React Angular TypeScript
PrimaryCSC UI Colors Primary Secondary AccentCustom Colors Red Orange Green Blue Purple Pink
CSC UI Colors Primary Secondary AccentCustom Colors Red Orange Green Blue Purple Pink
Guides Getting started Customization Data visualization Migration guide Componentsc-accordionc-alertc-autocompletec-badgec-breadcrumbc-buttonc-button-groupc-cardc-checkboxc-color-pickerc-csc-logoc-data-tablec-date-pickerc-dividerc-file-uploadc-iconc-icon-buttonc-linkc-listc-loaderc-login-buttonsc-login-cardc-mainc-menuc-messagec-modalc-navigation-buttonc-number-fieldc-otp-inputc-pagec-paginationc-popoverc-progress-barc-progress-circlec-radio-groupc-selectc-side-navigationc-sliderc-spinnerc-statusc-stepsc-switchc-tablec-tabsc-tagsc-text-fieldc-time-pickerc-toastsc-toolbarc-tooltipc-tree-select

<c-steps>

A step indicator for a multi-step flow: a row of `c-step` dots joined by lines, with the steps before the current one checked off and the current one ringed.

Usage

Set value to the number of the current step, counting from 1 (value="3" reads as 3). The steps before it show a check mark and the lines up to it fill in; a value one past the last step shows every step complete. The indicator only displays progress: its steps are not clickable and it fires no events, so move between steps with the flow's own controls and update value from them.

<c-steps :value="step">
  <c-step>Choose resources</c-step>
  <c-step>Billing details</c-step>
  <c-step>Review</c-step>
</c-steps>

<c-button @click="step++">Next</c-button>

c-steps inserts the connecting lines between your c-step elements, in your own DOM (each line is a <div class="divider"> after a step), and keeps them in step when you add or remove steps.

When to use

  • Showing where the user is in a fixed sequence — a multi-page form, an order flow.
  • For sections the user switches between freely, use c-tabs.
  • For a completion percentage, use c-progress-bar.

Narrow containers

When the step labels no longer fit side by side within the element's own width, the steps shrink to bare dots joined by lines and the current step's label is shown below the row. The full layout returns once the labels fit again.

Accessibility

The row of dots is hidden from assistive technology. In its place c-steps carries a one-sentence summary — for example "Steps, step 2 of 4. Billing details. 1 step marked as completed." — read in its place on the page. It is not a Tab stop, since there is nothing to operate. The summary is a polite status region, so a change of value is announced; moving focus to the new step's content, such as its heading, still helps keyboard users.

Customization

c-steps::part(root) is the row of steps, and ::part(label) the current step's label shown below it in the narrow layout. Each step exposes ::part(root) (the step's box, its dot over its label), ::part(indicator) around the dot, ::part(dot) (an incomplete step's circle), ::part(complete) (a complete step's filled circle with its check mark) and ::part(label).

The current step's ring, complete steps and the lines leading up to the current step use the primary role, and upcoming steps and their lines the border-strong role; override the tokens to re-theme.

Examples

Basic
Vue React Angular TypeScript
<template>
  <div>
    <c-steps :value="step">
      <c-step>Choose resources</c-step>

      <c-step>Billing details</c-step>

      <c-step>Review</c-step>

      <c-step>Confirmation</c-step>
    </c-steps>

    <div class="example-row">
      <c-button :disabled="step === 1" appearance="outlined" @click="step--">
        Previous
      </c-button>

      <c-button :disabled="step === 5" @click="step++">Next</c-button>
    </div>
  </div>
</template>

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

const step = ref(1);
</script>
Basic · c-step
Vue React Angular TypeScript
<template>
  <div>
    <c-steps value="3">
      <c-step>Choose resources</c-step>

      <c-step>Billing details</c-step>

      <c-step>Review</c-step>

      <c-step>Confirmation</c-step>
    </c-steps>
  </div>
</template>

API reference

<c-steps>

A step indicator for a multi-step flow: a row of `c-step` dots joined by lines, with the steps before the current one checked off and the current one ringed.

Properties

PropertyAttributeTypeDefaultDescription
valuevaluenumber1 Number of the current step, counting from 1.

Slots

SlotDescription
defaultThe `c-step` elements, one per step of the flow

CSS parts

Style from outside with c-steps::part(name) — parts are the library's only styling customization API.

PartDescription
rootThe row of steps and the lines joining them
labelThe current step's label, shown below the row in the narrow layout

<c-step>

One step of a `c-steps` indicator: its label goes in the default slot, under a dot that is ringed for the current step and becomes a check mark once the step is complete. A step has no props of its own — its state follows the parent's `value`.

Slots

SlotDescription
defaultThe step's label

CSS parts

Style from outside with c-step::part(name) — parts are the library's only styling customization API.

PartDescription
rootThe step's box: its indicator over its label
indicatorWrapper around the state indicator (incomplete dot or completed check)
dotThe circle shown while the step is incomplete, ringed for the current step
completeThe filled circle with the check mark shown when the step is complete
labelWrapper around the slotted label text