--- title: "Popover Position" groupTitle: "Examples" sort: 7 --- import { CodeSample } from "../../components/CodeSample.tsx"; You can control the popover position using the `side` and `align` options. The `side` option controls the side of the element where the popover will be shown and the `align` option controls the alignment of the popover with the element. > **Note:** Popover is intelligent enough to adjust itself to fit in the viewport. So, if you set `side` to `left` and `align` to `start`, but the popover doesn't fit in the viewport, it will automatically adjust itself to fit in the viewport. Consider highlighting and scrolling the browser to the element below to see this in action. ```js import { driver } from "driver.js"; import "driver.js/dist/driver.css"; const driverObj = driver(); driverObj.highlight({ element: '#left-start', popover: { title: 'Animated Tour Example', description: 'Here is the code example showing animated tour. Let\'s walk you through it.', side: "left", align: 'start' } }); ```

Use the buttons below to show the popover.

left and align set to start. PS, we can use HTML in the title and descriptions of popover.', side: "left", align: 'start' } }} id={"left-start"} client:load /> left and align set to center. PS, we can use HTML in the title and descriptions of popover.', side: "left", align: 'center' } }} id={"left-start"} client:load /> left and align set to end. PS, we can use HTML in the title and descriptions of popover.', side: "left", align: 'end' } }} id={"left-start"} client:load /> top and align set to start. PS, we can use HTML in the title and descriptions of popover.', side: "top", align: 'start' } }} id={"top-start"} client:load /> top and align set to center. PS, we can use HTML in the title and descriptions of popover.', side: "top", align: 'center' } }} id={"top-start"} client:load /> top and align set to end. PS, we can use HTML in the title and descriptions of popover.', side: "top", align: 'end' } }} id={"top-start"} client:load /> right and align set to start. PS, we can use HTML in the title and descriptions of popover.', side: "right", align: 'start' } }} id={"right-start"} client:load /> right and align set to center. PS, we can use HTML in the title and descriptions of popover.', side: "right", align: 'center' } }} id={"right-start"} client:load /> right and align set to end. PS, we can use HTML in the title and descriptions of popover.', side: "right", align: 'end' } }} id={"right-start"} client:load /> bottom and align set to start. PS, we can use HTML in the title and descriptions of popover.', side: "bottom", align: 'start' } }} id={"bottom-start"} client:load /> bottom and align set to center. PS, we can use HTML in the title and descriptions of popover.', side: "bottom", align: 'center' } }} id={"bottom-start"} client:load /> bottom and align set to end. PS, we can use HTML in the title and descriptions of popover.', side: "bottom", align: 'end' } }} id={"right-start"} client:load />