The Welcome screen serves as the entry point of your onboarding flow, providing users with essential information and instructions before they begin the verification process.
Quick Implementation
1
<body>
2
<div id="form"></div>
3
</body>
Event Handling
Available Events
Event Name
Triggered When
form:welcome:loaded
Screen is successfully mounted
form:welcome:ready
User clicks the continue button
form:welcome:failed
Screen encounters an error
Event Usage Example
1
// Listen for successful screen mount
2
welcome.on('form:welcome:loaded', () => {
3
console.log('Welcome screen ready');
4
});
5
6
// Handle user clicking continue
7
welcome.on('form:welcome:ready', () => {
8
// Load the next screen (e.g., consent form)
9
consent.mount("#form");
10
});
11
12
// Handle errors
13
welcome.on('form:welcome:failed', (error) => {
14
console.error('Welcome screen error:', error);
15
});
Screen Customization
Basic Example
Full Customization
1
const welcome = oneSdk.component('form', {
2
name: "WELCOME", // Set the screen name identifier
3
type: "manual", // Set form type to manual input
4
title: { // Configure the title section
5
label: "Let's Get Started!",
6
style: { 'ff-title': { color: '#2563eb' } } // Style title color
Use consistent colors and fonts across your implementation
Ensure sufficient contrast for accessibility
Maintain padding and spacing for readability
Test your customizations across different screen sizes
All styling should be applied through the appropriate style objects
(ff-title, ff-description, ff-instructions, ff-button). Direct CSS
manipulation isn’t recommended.