1.0.40 • Published 1 year ago
inspirex-onboarding-sdk v1.0.40
React Native Onboarding SDK
A flexible and customizable onboarding flow SDK for React Native applications.
Installation
npm install inspirex-onboarding-sdk
# or
yarn add inspirex-onboarding-sdkUsage
- Import and initialize the SDK:
import sdk from 'inspirex-onboarding-sdk';
// Initialize the SDK
sdk.initialize('your-api-key');
// Set user information
sdk.setUser({
id: 'user-123',
name: 'John Doe',
email: 'john.doe@example.com',
properties: { plan: 'premium' }
});- Start the flow and listen for events:
// Start the flow
sdk.startFlow();
// Listen for events
sdk.on('flowStart', (data) => {
console.log('Flow started:', data.flowId);
});
sdk.on('flowComplete', (data) => {
console.log('Flow completed:', data.flowId);
});
sdk.on('screenChange', (data) => {
console.log('Screen changed:', data.screenId);
});- Render the flow in your React Native app:
import React from 'react';
import sdk from 'inspirex-onboarding-sdk';
const FlowComponent = sdk.getFlowComponent();
export const App = () => {
return (
<>
{/* Your app content */}
<FlowComponent />
</>
);
};Features
- Fully customizable UI components
- TypeScript support
- Event-based architecture
- Screen navigation
- Modal-based presentation
- Flexible styling options
API Reference
SDK Methods
initialize(apiKey: string): Initialize the SDK with your API keysetUser(user: User): Set the current user informationstartFlow(): Start the onboarding flowcompleteFlow(): Complete the current flowgetFlowComponent(): Get the React component to render the flow
Event Types
flowStart: Emitted when the flow startsflowComplete: Emitted when the flow is completedscreenChange: Emitted when the screen changes
License
ISC
1.0.40
1 year ago
1.0.39
1 year ago
1.0.38
1 year ago
1.0.37
1 year ago
1.0.36
1 year ago
1.0.35
1 year ago
1.0.34
1 year ago
1.0.33
1 year ago
1.0.32
1 year ago
1.0.31
1 year ago
1.0.29
1 year ago
1.0.28
1 year ago
1.0.27
1 year ago
1.0.23
1 year ago
1.0.22
1 year ago
1.0.21
1 year ago
1.0.20
1 year ago
1.0.19
1 year ago
1.0.18
1 year ago
1.0.17
1 year ago
1.0.16
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.9
1 year ago
1.0.8
1 year ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago