How to use Stepper in React version of Metronic 8?
The documentation for HTML Metronic 8 shows a Stepper for forms, but I can't seem to use that Stepper in the React version. I assume there is a component for the Stepper in the React version, but I cannot see that in the documentation. How do I use the HTML Stepper or a Stepper component in the React version?
Replies (3)
Hi,
We have examples of StepperComponent usage in react version on Horizontal Wizard page and Vertical Wizard page.
src/_metronic/assets/ts/components/_StepperComponent.ts is our typescript version of stepper.js from HTML version, so methods, events, and markup references are the same as in our HTML version. You can refer to HTML version's stepper doc page.
https://preview.keenthemes.com/html/metronic/docs/general/stepper
Regards,
Lauris Stepanovs,
Keenthemes Support Team
How should I import the StepperComponent? Is it imported as a script or as a React component? I tried copying the HTML version's sample code and it wasn't working. What functions do I import?
Thank you for your assistance
Hi,
You can import StepperComponent from src/_metronic/assets/ts/components/_StepperComponent.ts, it is a typescript file.
import {StepperComponent} from '../../../assets/ts/components'
Usage examples can be found in src/_metronic/partials/modals/create-app-stepper/CreateAppModal.tsx,src/app/modules/wizards/components/Horizontal.tsx and src/app/modules/wizards/components/Vertical.tsx.
Regards,
Lauris Stepanovs,
Keenthemes Support Team