Tour
Product tour with spotlight highlights and step navigation.
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
| Name | Type | Default |
|---|---|---|
| steps | list | None | None |
| active | int | 0 |
| event | str — renames the event; identity is `name` | 'tour' |
| show_progress | bool | True |
| show_skip | bool | True |
| custom_class | str | '' |
| **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
| File | Path | Notes |
|---|---|---|
| module | djust.components.components.tour | Subclass it, or pass custom_class, to change how it renders. |