Onboarding Component
OnBoarding component is a versatile React Native component designed for creating interactive onboarding experiences. It allows you to guide users through a series of screens, collect their responses.
Last updated
OnBoarding component is a versatile React Native component designed for creating interactive onboarding experiences. It allows you to guide users through a series of screens, collect their responses.
Last updated
To unlock early access to the component Get Access
To install the Quest react-native-sdk
into your project, follow these steps:
Open your terminal/command prompt.
Navigate to your project's root directory using the cd
command if you're not already there.
Run the following command to install the quest-sdk
package using npm:
This command will download and install the package and its dependencies into your project.
Make sure your project has npm and Node.js installed, and that you have the necessary permissions to install packages in your project directory.
Import the QuestProvider Component: Import the QuestProvider
component from the @questlabs/react-sdk
package.
Pass the Required Props: Pass the required props to the QuestProvider
. The required props are apiKey
, entityId,
authenticationToken
and fontFamily.
To load external fonts, please refer this doc to setup expo-font on your expo app.
To integrate the Onboarding
component into your React native application, follow these steps.
Import useOnboarding Hook: Import the useOnboarding
component from the @questlabs/react-sdk
package.
Import the Onboarding Component: Import the Onboarding
component from the @questlabs/react-sdk
package.
Pass the Required Props: Pass the required props to the useOnboarding
. The required props are questId
, questUserId
, and userToken
or if user don't have quest User id then they can pass own userId to get questUserId and Token.
Don't not use QuestProvider and useOnboarding Hook in same file.
The Onboarding component accepts the following props
template
"multipage" | "single" | "oneQuestion";
optional
What kind of template you need.
multipleChoice
"checkbox" | "fill";
optional
What kind of multichoice you need.
onCross
Function
optional
create the function for onCross.
onError
Function
optional
For Showing the Error.
sections
ISection[]
Require
user need to provied filled data related to the template.
questId
string
Require
Provied quest id
questUserId
string
optional
provied quest user id
userToken
string
optional
Provied quest token
actions
ICriteria[]
optional
user need to provied filled data related to the section action name.
loading
boolean
optional
don't use in offline mode.
title
string
optional
component title text
description
string
optional
component title description text.
isModal
boolean
optional
Open as Modal.
campaignVariationId
string
optional
Id For verification.
styleConfig
object
optional
An object containing Styling properties for styling various components within the get started process, including form, topbar, headings, descriptions, and buttons.
App.js
DemoComponent.tsx