Learn how to create and customize banners in Oppla tours
import { createTour } from '@oppla-ai/tours'; const tour = createTour({ id: 'announcement-tour', steps: [ { type: 'banner', content: 'New feature available!' } ] }); tour.start();
{ type: 'banner', content: 'New feature available!', position: 'top', duration: 5000, closable: true, type: 'info' // 'info', 'success', 'warning', 'error' }
{ type: 'banner', content: 'New feature available!', style: { backgroundColor: '#ffffff', color: '#000000', padding: '12px 24px', boxShadow: '0 2px 4px rgba(0,0,0,0.1)', borderRadius: '4px' } }
{ type: 'banner', content: ` <div> <h3>New Feature Available</h3> <p>Check out our latest update!</p> <button onclick="learnMore()">Learn More</button> </div> `, allowHTML: true }
{ type: 'banner', content: ` <div> <p>Would you like to enable notifications?</p> <button onclick="enableNotifications()">Enable</button> <button onclick="dismiss()">Dismiss</button> </div> `, allowHTML: true, onClose: () => { // Handle banner close } }
{ type: 'banner', content: 'Welcome to our premium features!', showIf: { type: 'user-property', property: 'plan', value: 'premium' } }
Was this page helpful?