Tour

Product tour with spotlight highlights and step navigation.

python 7 params

Preview

Renders nothing until started — it draws over the page's own elements.

Usage

views.py
python
from djust import LiveView
from djust.components import Tour


class MyView(LiveView):
    template_name = "my_template.html"

    def mount(self, request, **kwargs):
        self.component = Tour()
my_template.html
django
{{ component }}

Needs a client hook djust does not ship: dj-hook="Tour". The markup renders, but the interaction described above is yours to add — register window.djust.hooks.Tour = { mounted() { … } } before client.js loads (see the hooks guide).

Parameters

NameTypeDefault
stepslist | NoneNone
activeint0
eventstr — renames the event; identity is `name`'tour'
show_progressboolTrue
show_skipboolTrue
custom_classstr''
**kwargs— passed to `Component.__init__`: `name=` identifies the instance in the events it sends, `id=` sets `component.id`, and any other keyword is kept as state
Source & styles
FilePathNotes
moduledjust.components.components.tourSubclass it, or pass custom_class, to change how it renders.