Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsMay 28, 2026·2 min de lectura

Driver.js — Interactive Product Tours for the Web

A lightweight JavaScript library for creating step-by-step guided tours and feature highlights with no external dependencies.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
Driver.js Overview
Comando de instalación directa
npx -y tokrepo@latest install f967afbe-5a29-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con dry-run.

Introduction

Driver.js is a vanilla JavaScript engine for creating interactive guided tours, feature introductions, and contextual help overlays. It uses no external dependencies and works across all modern browsers by manipulating a simple SVG overlay to focus attention on specific page elements.

What Driver.js Does

  • Highlights any DOM element with an animated overlay cutout
  • Supports multi-step guided tours with previous/next navigation
  • Provides non-intrusive popovers for feature announcements
  • Allows programmatic control of tour flow and step transitions
  • Works with any frontend framework (React, Vue, Svelte, Angular)

Architecture Overview

Driver.js renders an SVG overlay on top of the page and calculates the bounding rectangle of each highlighted element. The library positions a popover adjacent to the cutout, handling scroll and resize events. All state is managed in a lightweight internal store with no virtual DOM.

Self-Hosting & Configuration

  • Install via npm, yarn, or pnpm, or load from a CDN script tag
  • Import the CSS file for default popover and overlay styles
  • Configure global options like animation duration, overlay color, and opacity
  • Customize popover placement with side and align properties
  • Hook into lifecycle callbacks: onHighlightStarted, onHighlighted, onDeselected

Key Features

  • Zero dependencies and under 5 KB gzipped
  • Animated transitions between highlighted elements
  • Keyboard navigation support with customizable shortcuts
  • Mobile-friendly with responsive positioning
  • Fully typed with TypeScript declarations included

Comparison with Similar Tools

  • Intro.js — More feature-rich but larger bundle size and requires a license for commercial use
  • Shepherd.js — Uses Floating UI for positioning, heavier but more flexible theming
  • React Joyride — React-specific wrapper; Driver.js is framework-agnostic
  • Guided Tour (Angular) — Angular-only; Driver.js works with any stack

FAQ

Q: Does Driver.js work with single-page applications? A: Yes. You can trigger highlights programmatically on route changes or component mounts.

Q: Can I style the popovers? A: Yes. Override the default CSS classes or pass custom popover render functions.

Q: Is it accessible? A: Driver.js supports keyboard navigation and focus management out of the box.

Q: Is a license required for commercial use? A: Driver.js is MIT-licensed and free for both personal and commercial projects.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados