📄 useStepper¶
📊 Analysis Summary¶
| Metric | Count |
|---|---|
| 🔧 Functions | 12 |
| 📦 Imports | 5 |
| 🟢 Vue Composition API | 6 |
| 📐 Interfaces | 1 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 packages/core/useStepper/index.ts
📦 Imports¶
| Name | Source |
|---|---|
ComputedRef |
vue |
MaybeRef |
vue |
Ref |
vue |
computed |
vue |
deepRef |
vue |
Vue Composition API¶
| Name | Type | Reactive Variables | Composables |
|---|---|---|---|
computed |
computed | none | none |
computed |
computed | none | none |
computed |
computed | none | none |
computed |
computed | none | none |
computed |
computed | none | none |
computed |
computed | none | none |
Functions¶
useStepper(steps: MaybeRef<T[]>, initialStep: T): UseStepperReturn<T, T[], T>¶
Provides helpers for building a multi-step wizard interface.
See: https://vueuse.org/useStepper
Tags: @__NO_SIDE_EFFECTS__
Raw JSDoc
Code
Internal helpers¶
Declared inside another function in this file.
at(index: number): any¶
Parameters:
indexnumber
Returns: any
Calls:
Array.isArray
Code
get(step: any): any¶
Parameters:
stepany
Returns: any
Calls:
stepNames.value.includesatstepNames.value.indexOf
Code
goTo(step: any): void¶
Parameters:
stepany
Returns: void
Calls:
stepNames.value.includesstepNames.value.indexOf
Code
goToNext(): void¶
Returns: void
goToPrevious(): void¶
Returns: void
goBackTo(step: any): void¶
Parameters:
stepany
Returns: void
Calls:
isAftergoTo
isNext(step: any): boolean¶
Parameters:
stepany
Returns: boolean
Calls:
stepNames.value.indexOf
isPrevious(step: any): boolean¶
Parameters:
stepany
Returns: boolean
Calls:
stepNames.value.indexOf
isCurrent(step: any): boolean¶
Parameters:
stepany
Returns: boolean
Calls:
stepNames.value.indexOf
isBefore(step: any): boolean¶
Parameters:
stepany
Returns: boolean
Calls:
stepNames.value.indexOf
isAfter(step: any): boolean¶
Parameters:
stepany
Returns: boolean
Calls:
stepNames.value.indexOf
Interfaces¶
UseStepperReturn<StepName, Steps, Step>¶
Interface Code
export interface UseStepperReturn<StepName, Steps, Step> {
/** List of steps. */
steps: Readonly<Ref<Steps>>
/** List of step names. */
stepNames: Readonly<Ref<StepName[]>>
/** Index of the current step. */
index: Ref<number>
/** Current step. */
current: ComputedRef<Step>
/** Next step, or undefined if the current step is the last one. */
next: ComputedRef<StepName | undefined>
/** Previous step, or undefined if the current step is the first one. */
previous: ComputedRef<StepName | undefined>
/** Whether the current step is the first one. */
isFirst: ComputedRef<boolean>
/** Whether the current step is the last one. */
isLast: ComputedRef<boolean>
/** Get the step at the specified index. */
at: (index: number) => Step | undefined
/** Get a step by the specified name. */
get: (step: StepName) => Step | undefined
/** Go to the specified step. */
goTo: (step: StepName) => void
/** Go to the next step. Does nothing if the current step is the last one. */
goToNext: () => void
/** Go to the previous step. Does nothing if the current step is the previous one. */
goToPrevious: () => void
/** Go back to the given step, only if the current step is after. */
goBackTo: (step: StepName) => void
/** Checks whether the given step is the next step. */
isNext: (step: StepName) => boolean
/** Checks whether the given step is the previous step. */
isPrevious: (step: StepName) => boolean
/** Checks whether the given step is the current step. */
isCurrent: (step: StepName) => boolean
/** Checks if the current step is before the given step. */
isBefore: (step: StepName) => boolean
/** Checks if the current step is after the given step. */
isAfter: (step: StepName) => boolean
}
Properties¶
| Name | Type | Optional | Description |
|---|---|---|---|
steps |
Readonly<Ref<Steps>> |
✗ | not shown |
stepNames |
Readonly<Ref<StepName[]>> |
✗ | not shown |
index |
Ref<number> |
✗ | not shown |
current |
ComputedRef<Step> |
✗ | not shown |
next |
ComputedRef<StepName \| undefined> |
✗ | not shown |
previous |
ComputedRef<StepName \| undefined> |
✗ | not shown |
isFirst |
ComputedRef<boolean> |
✗ | not shown |
isLast |
ComputedRef<boolean> |
✗ | not shown |
at |
(index: number) => Step \| undefined |
✗ | not shown |
get |
(step: StepName) => Step \| undefined |
✗ | not shown |
goTo |
(step: StepName) => void |
✗ | not shown |
goToNext |
() => void |
✗ | not shown |
goToPrevious |
() => void |
✗ | not shown |
goBackTo |
(step: StepName) => void |
✗ | not shown |
isNext |
(step: StepName) => boolean |
✗ | not shown |
isPrevious |
(step: StepName) => boolean |
✗ | not shown |
isCurrent |
(step: StepName) => boolean |
✗ | not shown |
isBefore |
(step: StepName) => boolean |
✗ | not shown |
isAfter |
(step: StepName) => boolean |
✗ | not shown |
Generated by Syntax Scribe