Step Progress
Generated from public Vue/TypeScript exports by
pnpm docs:generate. Edit source comments and stories to update this reference. Types describe the declared API; browser/device constraints are covered in the guides. This catalog reflects source commitfc6bfb108634735f1657e533206c3f8702ad357d; match your installed package and typed manifest before using an export. Source review does not establish registry-release availability.
StepProgress
import { StepProgress } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
currentStep | number | Required | Current step (1-indexed) |
totalSteps | number | Required | Total number of steps |
steps | StepItem[] | undefined | — | Step items for indicators (optional) |
completedSteps | string[] | Set<string> | undefined | — | Set of completed step IDs |
flaggedSteps | string[] | undefined | — | Set of flagged/bookmarked step IDs |
showIndicators | boolean | undefined | true | Show individual step indicators (default true) |
showCompletedCount | boolean | undefined | true | Show completed count (default true) |
allowNavigation | boolean | undefined | true | Allow clicking indicators to navigate (default true) |
maxIndicators | number | undefined | 20 | Max indicators to display (default 20) |
labelTemplate | string | undefined | "Step {current} of {total}" | Label template: "Step {current} of {total}" |
Events
| Name | Type | Required / default | Description |
|---|---|---|---|
navigate | [stepNumber: number] | — | — |
Examples
These are authored Storybook excerpts, not complete standalone modules. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.
Default
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import StepProgress from './StepProgress.vue'
const defaultArgs = {
currentStep: 3,
totalSteps: 10,
showIndicators: true,
showCompletedCount: true,
allowNavigation: true,
maxIndicators: 20,
}
{
args: {
currentStep: 3,
totalSteps: 5,
steps: createSteps(5),
completedSteps: ['step-1', 'step-2'],
},
render: (args) => ({
components: { StepProgress },
setup() {
return { args }
},
template: '<StepProgress v-bind="args" @navigate="onNavigate" />',
methods: {
onNavigate(step: number) {
console.log('Navigate to step:', step)
},
},
}),
}
ManySteps
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import StepProgress from './StepProgress.vue'
const defaultArgs = {
currentStep: 3,
totalSteps: 10,
showIndicators: true,
showCompletedCount: true,
allowNavigation: true,
maxIndicators: 20,
}
{
args: {
currentStep: 12,
totalSteps: 20,
steps: createSteps(20),
completedSteps: Array.from({ length: 11 }, (_, i) => `step-${i + 1}`),
},
render: (args) => ({
components: { StepProgress },
setup() {
return { args }
},
template: '<StepProgress v-bind="args" @navigate="onNavigate" />',
methods: {
onNavigate(step: number) {
console.log('Navigate to step:', step)
},
},
}),
}
WithCompleted
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import StepProgress from './StepProgress.vue'
const defaultArgs = {
currentStep: 3,
totalSteps: 10,
showIndicators: true,
showCompletedCount: true,
allowNavigation: true,
maxIndicators: 20,
}
{
args: {
currentStep: 4,
totalSteps: 8,
steps: createSteps(8),
completedSteps: ['step-1', 'step-2', 'step-3', 'step-5'],
},
render: (args) => ({
components: { StepProgress },
setup() {
return { args }
},
template: '<StepProgress v-bind="args" />',
}),
}