1.0.40 • Published 6 months 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-sdk
Usage
- 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
6 months ago
1.0.39
6 months ago
1.0.38
6 months ago
1.0.37
6 months ago
1.0.36
6 months ago
1.0.35
6 months ago
1.0.34
6 months ago
1.0.33
6 months ago
1.0.32
6 months ago
1.0.31
6 months ago
1.0.29
6 months ago
1.0.28
6 months ago
1.0.27
6 months ago
1.0.23
6 months ago
1.0.22
6 months ago
1.0.21
6 months ago
1.0.20
6 months ago
1.0.19
6 months ago
1.0.18
6 months ago
1.0.17
6 months ago
1.0.16
6 months ago
1.0.15
6 months ago
1.0.14
6 months ago
1.0.13
6 months ago
1.0.12
6 months ago
1.0.11
6 months ago
1.0.10
6 months ago
1.0.9
6 months ago
1.0.8
6 months ago
1.0.7
6 months ago
1.0.6
6 months ago
1.0.5
6 months ago
1.0.4
6 months ago
1.0.3
6 months ago
1.0.2
6 months ago
1.0.1
6 months ago
1.0.0
6 months ago