driver.js / docs /src /content /guides /basic-usage.mdx
kamrify's picture
Change package name
c325220
raw
history blame
647 Bytes
---
title: "Basic Usage"
groupTitle: "Introduction"
sort: 2
---
Once installed, you can import and start using the library. Given below is a simple example of how to highlight a single element.
```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',
},
});
```
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/driver.iife.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/style.css"/>