SDK API reference
Public React Native SDK component, callback, and type overview.
Onboarding properties#
| Prop | Type | Details |
|---|---|---|
flowId | string | OnboardingYak app ID. |
apiKey | string | App publishable key. |
baseUrl | string | Studio origin. |
fallbackFlow | OnboardingFlow | Required local fallback data. |
analyticsEnvironment | development | testing | production | Optional event environment override. |
locale | string | Optional locale override. |
appearance | light | dark | system | Optional theme override. |
resume | boolean | Defaults to true; set false to restart each time. |
renderVideo | (video: OnboardingVideo) => ReactNode | Optional host video renderer. |
Callbacks#
| Callback | Signature | When it runs |
|---|---|---|
onComplete | (answers, details) => void | Flow finishes or is skipped. Details include typed variables. |
onAnswer | (screen, answer, values, variable?) => void | A question answer is submitted. |
onAction | (action, screen, details) => boolean | void | Promise | A screen action other than next or complete runs. |
Exported types#
The package exports OnboardingFlow, OnboardingVideo, and VariableValue. Use these types to construct a valid fallback and type your video renderer or completion logic.
import { Onboarding, type OnboardingFlow, type OnboardingVideo } from '@onboarding-yak/react-native';