Krizaka
Documentation

Onboarding

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

MobileBetaLayout

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

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

Orochia'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 3.5.0: its meta.ts, its examples and its types.Edit this documentation on GitHub

On this page