Revel
GitHub
GitHub
  • Overview

    • Getting started
    • FAQ
    • Release notes
  • Foundations

    • Meet the standard
    • Accessibility
    • Internationalization
    • Information hierarchy
    • Speed
  • Design

    • Visual principles
    • Colors
    • Space
    • Icons
    • Typography
  • Design tokens
  • Style helpers
  • Content

    • Express your ideas
    • Actionable language
    • Inclusive and accessible language
    • Alternative text
    • Grammar and mechanics
      • Basics
      • Capitalization
      • Dates and units of measurement
      • Punctuation
  • Components

    • Alert
    • Avatar
    • Badge
    • Button
    • Button group
    • Checkbox
    • Date Input
      • dates
      • datetimes
      • ranges
      • date range
    • Field group
    • File upload
    • Flex
    • Grid
    • Icon
    • Image
    • Input
    • Loader
    • Modal
    • Month picker
    • Multistep
      • multistep
      • step
    • Pagination
    • Popper
    • Radio
    • Repeater
    • Select
    • Tabs
    • Tile
    • Toast
    • Toggle
  • Directives

    • Click outside
    • Tooltip

Multistep

Component used to show progression thru a pre-determined process.

Used to wrap <r-step/> components and manage the actions.

Set the index that is active and provide an array of index for completed steps.

Usage

import { ref } from 'vue';
import { RMultistep } from '@rebilly/revel';

<r-multistep></r-multistep>;

You can bind to current and completed to programmatically determine what step is active.

import { ref } from 'vue';
import { RMultistep } from '@rebilly/revel';

const current = ref<string>('ready');
const completed = ref<string[]>(['pending']);

<r-multistep
    v-model:current="current"
    v-model:completed="completed"
></r-multistep>

Use the exposed nextStep, and prevStep functions to help navigate the steps.

import { ref } from 'vue';
import { RMultistep } from '@rebilly/revel';

const multistep = ref<RMultistep>();

multistep?.nextStep();
multistep?.prevStep(() => {
    console.log('Previous step triggered')
})

<r-multistep
    ref="multistep"
></r-multistep>

Multistep also exposes hasNextStep and hasPrevStep to help guard UI's

import { ref } from 'vue';
import { RMultistep, RButton } from '@rebilly/revel';

const multistep = ref<RMultistep>();

<r-button
    @click="multistep?.nextStep"
    :disabled="!multistep?.hasNextStep"
>
    Next
</r-button>

<r-button
    @click="multistep?.prevStep"
    :disabled="!multistep?.hasPrevStep"
>
    Previous
</r-button>

<r-multistep
    ref="multistep"
>
</r-multistep>

API

Props

NameTypeDefaultDescription
currentstringundefined

The initial value of the current step.

completedArray, string() => []

The initial list of completed steps.

Events

NameDescription
update:currentv-model:current will two way bind the current step value.
update:completedv-model:completed will two way bind the completed steps value.

Expose

NameDescriptionParametersReturns
steps

All step indexes.

string[]: An array of step indexes.
hasNextStep

Indicates whether there is a next step available.

boolean: True if there is a next step, false otherwise.
hasPrevStep

Indicates whether there is a previous step available.

boolean: True if there is a previous step, false otherwise.
nextStep

Progress the step forward.

callback (() => void): called after the next step has been set.
void
prevStep

Reverse the step backward.

callback (() => void): called after the previous step has been set.
void
Edit this page
Last Updated: 2/10/26, 4:30 PM
Contributors: Matthew Sanford, Simon, Cesar Level
Next
step