Popover Configuration
The popover is the tooltip-like box that appears alongside the highlighted element, displaying a title, description, and navigation buttons. Laravel Driver.js provides fluent methods to customize every aspect of the popover.
Setting a Custom CSS Class

DriverJs::popoverClass(string $class);Adds a custom CSS class to the popover wrapper element. This allows you to style the popover with your own CSS.
Example
DriverJs::tour('onboarding')
->popoverClass('my-custom-popover')
->step('#header', 'Welcome')
->render();Setting the Popover Offset
DriverJs::popoverOffset(int $offset);Sets the distance (in pixels) between the popover and the highlighted element. The default is 10.
Example
DriverJs::tour('onboarding')
->popoverOffset(20)
->step('#header', 'Welcome')
->render();Showing/Hiding Buttons
DriverJs::showButtons(array $buttons);Sets which navigation buttons to display globally. Accepts an array containing any combination of "next", "previous", and "close". The default is ["next", "previous", "close"].
Example
// Show only Next and Close (hide Previous)
DriverJs::tour('onboarding')
->showButtons(['next', 'close'])
->step('#header', 'Welcome')
->render();Disabling Buttons
DriverJs::disableButtons(array $buttons);Visually disables specific buttons (they appear greyed out but are still visible). Accepts an array containing any combination of "next", "previous", and "close".
Example
// Disable the Previous button on the first step
DriverJs::tour('onboarding')
->disableButtons(['previous'])
->step('#header', 'Welcome')
->render();Showing Progress
DriverJs::showProgress(bool $show = true);Shows or hides the "X of Y" progress indicator in the popover footer. The default is false.
Example
DriverJs::tour('onboarding')
->showProgress()
->step('#header', 'Welcome')
->step('#nav', 'Navigation')
->step('#footer', "That's it!")
->render();Setting Progress Text
DriverJs::progressText(string $text);Sets the progress text template. Use and as placeholders. The default is " of ".
Example
DriverJs::tour('onboarding')
->showProgress()
->progressText('Step {{current}} of {{total}}')
->step('#header', 'Welcome')
->step('#nav', 'Navigation')
->render();Step-Level Popover Configuration
Each step can override the global popover configuration. Use the step builder methods to customize individual steps:
DriverJs::addStep('#header')
->title('Welcome!')
->description('The main header.')
->side('bottom')
->align('center')
->popoverClass('header-popover')
->showButtons(['next', 'close'])
->showProgress(true)
->nextBtnText('Continue')
->doneBtnText('Finish');
DriverJs::addStep('#nav')
->title('Navigation')
->description('Use these links.')
->side('right')
->align('start')
->disableButtons(['previous']);
DriverJs::tour('onboarding')
->showProgress()
->render();Complete Popover Configuration Example
DriverJs::tour('onboarding')
->popoverClass('my-tour-popover')
->popoverOffset(15)
->showButtons(['next', 'previous', 'close'])
->disableButtons([])
->showProgress()
->progressText('Step {{current}} of {{total}}')
->nextBtnText('Continue →')
->prevBtnText('← Go Back')
->doneBtnText('Get Started!')
->step('#header', 'Welcome!', 'This is the header.')
->step('#nav', 'Navigation', 'Navigate your app.')
->step('#footer', "That's it!", "You're ready!")
->render();That's it! You're now equipped to configure popovers using Laravel Driver.js.