Prop | Default | Type |
---|---|---|
as | 'div' | AsTag | Component The element or component this component should render as. Can be overwritten by |
asChild | boolean Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. | |
defaultValue | 1 | number The value of the step that should be active when initially rendered. Use when you do not need to control the state of the steps. |
dir | 'ltr' | 'rtl' The reading direction of the combobox when applicable. | |
linear | true | boolean Whether or not the steps must be completed in order. |
modelValue | number The controlled value of the step to activate. Can be bound as | |
orientation | 'horizontal' | 'vertical' | 'horizontal' The orientation the steps are laid out. Mainly so arrow navigation is done accordingly (left & right vs. up & down). |
Emit | Payload |
---|---|
update:modelValue | [payload: number] Event handler called when the value changes |
Slots (default) | Payload |
---|---|
modelValue | number | undefined Current step |
totalSteps | number Total number of steps |
isNextDisabled | boolean Whether or not the next step is disabled |
isPrevDisabled | boolean Whether or not the previous step is disabled |
isFirstStep | boolean Whether or not the first step is active |
isLastStep | boolean Whether or not the last step is active |
goToStep | (step: number): void Go to a specific step |
nextStep | (): void Go to the next step |
prevStep | (): void Go to the previous step |
hasNext | (): boolean Whether or not there is a next step |
hasPrev | (): boolean Whether or not there is a previous step |
Methods | Type |
---|---|
goToStep | (step: number) => void |
nextStep | () => void |
prevStep | () => void |
hasNext | () => boolean |
hasPrev | () => boolean |