Krizaka UI
Krizaka UI

Onboarding

A first launch in a few slides: swipe or tap Next, Skip at any time, dots that say where you are.

Web · n/aMobile · ✓Desktop · n/aBetaLayout
Support level
Beta
Size
Not measured
Who uses it
No live product imports it yet
Onboarding — First launch, as React Native renders it

“First launch”, its React Native story at a phone's width — the same code on iOS and Android.

Mobile only — React Native, from @krizaka/ui/native. Beta: its API may still change in a minor version.

  • Web · n/a. A web first run is a few steps on one page. → Stepper
  • Desktop · n/a. The Mac app's first run is the install wizard, a stepper. → Stepper

Why it is here. the native apps: Verikora and Folioviv mobile, Sovkora mobile: first launch and profile set-up flows.

When to use

  • The first launch of an app: three promises, then the sign-in.

When not to use

Installation

Install

npx expo install react-native-svg
npm install @krizaka/ui

Import

import { Onboarding } from "@krizaka/ui/native";

Wrap the app once in ThemeProvider from @krizaka/ui/native: every component reads its colour roles.

Examples

React Native has no live preview on the web: each example shows the screenshot of its story, tested in both themes, and the code to copy.

First launch

An app's three promises.

Onboarding — First launch, as React Native renders itOnboarding — First launch, as React Native renders it

Props

A first launch in a few slides: swipe or tap Next, Skip at any time, dots that say where you are, the safe areas kept. Each slide is announced with its position; the buttons do everything a swipe does.

PropTypeDefaultDescription
labelsrequired{ next: string; done: string; skip: string; position: (n: number, total: number) => string; }—The words of the buttons — passed translated.
onDonerequired() => void—Called by “Get started” and “Skip”: remember it and leave.
slidesrequiredreadonly OnboardingSlide[]—The slides, three or four.
styleStyleProp<ViewStyle>—Styles merged last.

Accessibility

  • Each slide is announced with its position; the buttons do everything a swipe does.
  • The safe areas are kept.

Best practices

  • Three slides, one promise each, a bird each.
  • Remember that it was seen in onDone; never show it twice.

Generated from the code of @krizaka/ui 5.3.4: its meta.ts, its examples and its types.Edit this documentation on GitHub

On this page