This component allows you to create a customizable guide.
It exports TourStep
which provide a way to encapsulate any component into a simple step/highlight for your walkthrough.
TourStep
accept any component as a tooltip
propertie but you can use TourTooltip
as a default behaviour.
Your html will be keep the same. Nothing is inject.
Warning
You have to handle the state of the guide yourself. It is usefull if you want to create a complexe manager which show a step by step walkthrough between multiple pages.
It comes with a basic stylesheet to show you the possibilities but you'll have to create your own to create something attractive.
Demo
;;; state = step: 0 ; { this; } { return <TourTooltip dir="top"> <div className="tooltip-content"> Tooltip content </div> </TourTooltip> ; } { let step = thisstate; return <div className="App"> <header className="App-header"> <img src=logo className="App-logo" alt="logo" /> <h1 className="App-title">Welcome to React</h1> </header> <div className="App-intro"> <TourStep active=step === 0 tooltip=this onClick=thisgoToNextStep > <div> To get started edit <code>src/Appjs</code> and save to reload </div> <div> Step 0 </div> </TourStep> </div> <TourStep active=step === 1 tooltip=this onClick=thisgoToNextStep > <section className="step-1" style=height: 200 width: 150> Step 1 </section> </TourStep> <TourStep active=step === 2 tooltip=this onClick=thisgoToNextStep > <section style=height: 100 width: 300> Step 2 </section> </TourStep> <TourStep active=step === 1 tooltip=this onClick=thisgoToNextStep > <section style=height: 100 width: 300> Step 1 </section> </TourStep> </div> ; }