gilbarbara / react-joyride

Create guided tours in your apps
https://react-joyride.com/
MIT License
6.75k stars 524 forks source link

Documentation / example on setting up a controlled tour. #486

Closed burtonator closed 5 years ago

burtonator commented 5 years ago

It would be nice to have documentation and an example on how to setup a controlled tour.

I want the user to be able to click on a menu, reveal the menu, then click on a button.

Right now I can't figure out how to do this.

Joyride is great btw. Easy to setup and did a great job explaining the app we're developing:

https://getpolarized.io/

the goal is walk them through the main features and new features as they are shipped.

gilbarbara commented 5 years ago

Hey @burtonator Did you check the controlled example in the demo?

burtonator commented 5 years ago

Just to verify,

You just use the 'step' manually and then handle the state via the callbacks?

I think I figured it out. Maybe just a 'how to do a controlled demo' would work.

Also, do I need to manually determine when my app is in the right state by setting step once it's changed by adding my own event listeners?

gilbarbara commented 5 years ago

That's what the demo is for... :) Yeah, when you set a stepIndex the tour flow should be handled by you.