Learn how to create and customize tooltips in Oppla tours
import { createTour } from '@oppla-ai/tours'; const tour = createTour({ id: 'feature-tour', steps: [ { type: 'tooltip', target: '#feature-button', content: 'Click here to access this feature' } ] }); tour.start();
{ type: 'tooltip', target: '#feature-button', content: 'Click here to access this feature', placement: 'right', arrow: true, offset: 10, delay: 0 }
{ type: 'tooltip', target: '#feature-button', content: 'Click here to access this feature', style: { backgroundColor: '#ffffff', color: '#000000', borderRadius: '4px', padding: '12px', boxShadow: '0 2px 4px rgba(0,0,0,0.1)' } }
{ type: 'tooltip', target: '#feature-button', content: 'Click here to access this feature', placement: 'right', // 'top', 'right', 'bottom', 'left' arrow: true, offset: 10, container: '#tooltip-container' // Optional container element }
{ type: 'tooltip', target: '#feature-button', content: ` <div> <h3>New Feature</h3> <p>Click here to access this feature</p> <button onclick="handleClick()">Learn More</button> </div> `, allowHTML: true }
{ type: 'tooltip', target: '#feature-button', content: 'Click here to access this feature', showIf: { type: 'user-property', property: 'plan', value: 'premium' } }
Was this page helpful?