Skip to content
프로젝트

소개

페이지에서 사용자의 시선을 유도하는 가볍고 종속성이 없는 JavaScript 라이브러리입니다.

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
+3
in 7 days
+34
in 15 days
+226
in 1 month
+322

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original




Driver.js

jsdelivr hits downloads

Product tours, highlights, hints and onboarding checklists for the web
No dependencies, written in TypeScript, works with any framework


  • Tours: walk users through your app step by step
  • Action-driven steps: wait for the user to click, type or pick, and give feedback on wrong actions
  • Highlights: dim the page around any element, with or without a popover
  • Hints: pulsing beacons that open a popover on click, without blocking the page
  • Checklists: an onboarding widget whose items start tours and tick themselves off
  • Accessible: keyboard control, focus management and screen reader announcements
  • Themeable: plain CSS classes and variables
  • MIT licensed: free for personal and commercial use

Install

npm install driver.js

Usage

import { driver } from "driver.js";
import "driver.js/dist/driver.css";

const driverObj = driver({
  showProgress: true,
  steps: [
    { element: "#search", popover: { title: "Search", description: "Find anything from here." } },
    { element: "#new-project", popover: { title: "New project", description: "Start your first project." } },
  ],
});

driverObj.drive();

Highlight a single element:

driverObj.highlight({
  element: "#search",
  popover: { title: "Search", description: "Find anything from here." },
});

Make a step wait for the user:

const driverObj = driver({
  steps: [
    {
      element: "#new-project",
      advanceOn: "click",
      popover: { title: "Start a project", instruction: "Click <b>New project</b>." },
    },
    {
      element: "#project-name",
      waitForElement: 3000,
      popover: { title: "Name it", description: "Give your project a name." },
    },
  ],
});

Hints, checklists and headless tours are separate entries: driver.js/hints, driver.js/checklist and driver.js/headless.

Documentation

Guides, live demos and the full reference are on driverjs.com.

Developing locally

This is a pnpm monorepo. The library is in packages/driver, the playground in apps/playground and the docs site in apps/docs. Both apps import the library from source, so changes show up right away.

pnpm install
pnpm dev        # Playground
pnpm docs:dev   # Docs site
pnpm test       # Unit tests, in watch mode
pnpm test:e2e   # Playwright tests against the playground
pnpm build

Playground examples live in apps/playground/src/examples.

Contributions

Pull requests and issues are welcome.

License

MIT © Kamran Ahmed

관련 프로젝트 살펴보기

불러오는 중…