| Prop | Default | Type |
|---|---|---|
as | 'div' | AsTag | ComponentThe element or component this component should render as. Can be overwritten by |
asChild | booleanChange 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 | numberThe 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 | booleanWhether or not the steps must be completed in order. |
modelValue | numberThe 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 | undefinedCurrent step |
totalSteps | numberTotal number of steps |
isNextDisabled | booleanWhether or not the next step is disabled |
isPrevDisabled | booleanWhether or not the previous step is disabled |
isFirstStep | booleanWhether or not the first step is active |
isLastStep | booleanWhether or not the last step is active |
goToStep | (step: number): voidGo to a specific step |
nextStep | (): voidGo to the next step |
prevStep | (): voidGo to the previous step |
hasNext | (): booleanWhether or not there is a next step |
hasPrev | (): booleanWhether or not there is a previous step |
| Methods | Type |
|---|---|
goToStep | (step: number) => void |
nextStep | () => void |
prevStep | () => void |
hasNext | () => boolean |
hasPrev | () => boolean |
