mirror of
https://github.com/kamranahmedse/driver.js.git
synced 2026-10-31 03:52:13 +08:00
26 lines
578 B
Plaintext
26 lines
578 B
Plaintext
---
|
|
title: "Basic Usage"
|
|
groupTitle: "Introduction"
|
|
sort: 2
|
|
---
|
|
|
|
import { SimpleHighlight } from "../../components/examples/SimpleHighlight.tsx";
|
|
|
|
Once installed, you can import and start using the library. Given below is a simple example of how to highlight a single element.
|
|
|
|
<div>
|
|
```js
|
|
import Driver from 'driver.js';
|
|
import 'driver.js/dist/driver.min.css';
|
|
|
|
const driver = new Driver();
|
|
driver.highlight({
|
|
element: '#some-element',
|
|
popover: {
|
|
title: 'Title for the Popover',
|
|
description: 'Description for it',
|
|
},
|
|
});
|
|
```
|
|
<SimpleHighlight client:load />
|
|
</div> |