nilbuild/driver.js
Sobre
Uma biblioteca JavaScript leve e sem dependências para direcionar o foco do usuário pela página.
Ferramentas de desenvolvimentoCrescimento medido de estrelas
- em 24 h
- +3
- em 7 dias
- +34
- em 15 dias
- +226
- em 1 mês
- +322
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
Original
Driver.js
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
Explore projetos relacionados
Carregando…