Vitral 0.2
Panel

Stepper

Steps and their panels, horizontal or vertical, with an optional linear mode that keeps later steps out of reach.

Import

main.ts
import { Stepper } from '@vitral/vue';

Linear

Three items in your cart.

<script setup lang="ts">import { Button, InputText, Label, StackPanel, Step, StepList, StepPanel, StepPanels, Stepper } from '@vitral/vue';import { ref } from 'vue'; const step = ref('1');</script> <template>    <Stepper v-model:value="step" linear>        <StepList aria-label="Checkout">            <Step value="1">Cart</Step>            <Step value="2">Shipping</Step>            <Step value="3">Payment</Step>        </StepList>        <StepPanels>            <StepPanel v-slot="{ activateCallback }" value="1">                <p>Three items in your cart.</p>                <Button label="Continue" icon="arrowRight" icon-pos="right" @click="activateCallback('2')" />            </StepPanel>            <StepPanel v-slot="{ activateCallback }" value="2">                <StackPanel spacing="0.375rem" style="min-width: 16rem">                    <Label for="stepper-address">Address</Label>                    <InputText id="stepper-address" />                </StackPanel>                <div style="display: flex; gap: 0.5rem; margin-top: 1rem">                    <Button label="Back" severity="secondary" @click="activateCallback('1')" />                    <Button label="Continue" icon="arrowRight" icon-pos="right" @click="activateCallback('3')" />                </div>            </StepPanel>            <StepPanel v-slot="{ activateCallback }" value="3">                <p>Pay and finish.</p>                <Button label="Back" severity="secondary" @click="activateCallback('2')" />            </StepPanel>        </StepPanels>    </Stepper></template>

Vertical

Pick a name and a password.
<script setup lang="ts">import { Step, StepItem, StepPanel, Stepper } from '@vitral/vue';import { ref } from 'vue'; const vertical = ref('1');</script> <template>    <Stepper v-model:value="vertical">        <StepItem value="1">            <Step>Create an account</Step>            <StepPanel>Pick a name and a password.</StepPanel>        </StepItem>        <StepItem value="2">            <Step>Invite your team</Step>            <StepPanel>Send invitations by email.</StepPanel>        </StepItem>        <StepItem value="3">            <Step>Start a project</Step>            <StepPanel>Name it and choose a template.</StepPanel>        </StepItem>    </Stepper></template>

API

Read from packages/vue/src/components/Stepper/types.ts, so it says what the component actually accepts.

Props

NameTypeDescription
linearbooleanOnly the steps up to the current one can be chosen; the panels move the reader on.

Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.

Slots

NameSlot propsDescription
default——