Tour

Step-by-step guided walkthrough that highlights UI elements with a spotlight overlay and tooltip navigation.

This component requires softui.js for interactive behavior.

Default

AB
Alex Brown
Product Designer

Project Overview

Your dashboard shows all active projects and team activity.


<div style="display:flex;flex-direction:column;gap:16px;max-width:500px;">
  <div style="display:flex;gap:12px;align-items:center;">
    <div class="sui-avatar" id="tour-avatar">AB</div>
    <div>
      <div style="font-weight:600;font-size:14px;" id="tour-name">Alex Brown</div>
      <div style="font-size:12px;color:var(--sui-text-muted);">Product Designer</div>
    </div>
  </div>
  <div class="sui-card" style="padding:16px;" id="tour-card">
    <h4 style="font-size:14px;margin-bottom:6px;">Project Overview</h4>
    <p style="font-size:12px;color:var(--sui-text-muted);">Your dashboard shows all active projects and team activity.</p>
  </div>
  <div style="display:flex;gap:8px;">
    <button class="sui-btn sui-btn-primary sui-btn-sm" id="tour-btn-new">New Project</button>
    <button class="sui-btn sui-btn-sm" id="tour-btn-settings">Settings</button>
  </div>
  <hr class="sui-divider">
  <button class="sui-btn sui-btn-primary" style="align-self:flex-start;" onclick="startDemoTour()">Start Tour</button>
</div>
<script>
  function startDemoTour() {
    SoftUI.tour([
      { target: '#tour-avatar', title: 'Your Profile', description: 'This is your avatar. Click it to view your profile and account settings.', position: 'right' },
      { target: '#tour-card', title: 'Project Overview', description: 'Here you can see a summary of your active projects and recent activity.', position: 'bottom' },
      { target: '#tour-btn-new', title: 'Create a Project', description: 'Click here to start a new project. You can invite team members and set deadlines.', position: 'bottom' },
      { target: '#tour-btn-settings', title: 'Settings', description: 'Manage your account preferences, notifications, and integrations.', position: 'bottom' }
    ]);
  }
</script>

Without Overlay

3 new Online

Notifications

You have 3 unread notifications.

<div style="display:flex;flex-direction:column;gap:16px;max-width:500px;">
  <div style="display:flex;gap:8px;">
    <span class="sui-badge sui-badge-primary" id="tour2-badge">3 new</span>
    <span class="sui-badge sui-badge-success" id="tour2-badge2">Online</span>
  </div>
  <div class="sui-card" style="padding:16px;" id="tour2-card">
    <h4 style="font-size:14px;margin-bottom:6px;">Notifications</h4>
    <p style="font-size:12px;color:var(--sui-text-muted);">You have 3 unread notifications.</p>
  </div>
  <button class="sui-btn sui-btn-primary" style="align-self:flex-start;" onclick="startDemoTour2()">Start Tour (No Overlay)</button>
</div>
<script>
  function startDemoTour2() {
    SoftUI.tour([
      { target: '#tour2-badge', title: 'Notifications', description: 'You have new notifications waiting.', position: 'bottom' },
      { target: '#tour2-card', title: 'Notification Panel', description: 'Click to expand and see all your notifications.', position: 'bottom' },
      { target: '#tour2-badge2', title: 'Status', description: 'Your current online status is shown here.', position: 'bottom' }
    ], { noOverlay: true });
  }
</script>

Reference

Option / MethodDescription
SoftUI.tour(steps, options)Starts a tour at the first step and returns a handle with the methods below. Clicking the backdrop closes the tour.
step.targetCSS selector for the element to highlight.
step.titleStep title text.
step.descriptionStep description text.
step.positionTooltip side: 'top', 'bottom', 'left' or 'right'. Default 'bottom'.
step.htmlRenders this step's title and description as HTML; overrides the tour's html option.
paddingSpotlight padding around the target in px. Default 8.
noOverlaySkips the dimmed backdrop. Default false.
onCompleteCalled when the tour closes (Done, Skip or backdrop click).
htmlRenders titles and descriptions as HTML. Default false (plain text). Trusted content only, never user input.
.next()Goes to the next step.
.prev()Goes to the previous step.
.goTo(index)Jumps to the step at index (zero-based).
.close()Ends the tour and calls onComplete.

Delete this item?

This action cannot be undone. This will permanently delete the item and remove all associated data.