Learn how to create and customize modals in Oppla tours
import { createTour } from '@oppla-ai/tours'; const tour = createTour({ id: 'welcome-tour', steps: [ { type: 'modal', content: 'Welcome to our application!' } ] }); tour.start();
{ type: 'modal', content: 'Welcome to our application!', title: 'Welcome', width: '500px', height: 'auto', closeButton: true, overlay: true }
{ type: 'modal', content: 'Welcome to our application!', style: { backgroundColor: '#ffffff', color: '#000000', borderRadius: '8px', padding: '24px', boxShadow: '0 4px 6px rgba(0,0,0,0.1)' } }
{ type: 'modal', content: ` <div> <h2>Welcome to Our App</h2> <p>Get started by exploring our features.</p> <img src="/welcome-image.png" alt="Welcome" /> <button onclick="startTour()">Start Tour</button> </div> `, allowHTML: true }
{ type: 'modal', content: ` <form id="signup-form"> <input type="email" placeholder="Enter your email" /> <button type="submit">Sign Up</button> </form> `, allowHTML: true, onClose: () => { // Handle modal close } }
{ type: 'modal', content: 'Welcome to our premium features!', showIf: { type: 'user-property', property: 'plan', value: 'premium' } }
Was this page helpful?