Intro Header

The header of a step in a sheet or a setup flow: an optional symbol, the step's title and what it asks.

import { IntroHeader } from "@plexui/react-native"

Examples

Overview

Over a long list

Platforms

iOS 27Android
Native componentNone: the header of iOS's own setup stepsNone: the setup wizard's header
LookA ~70pt symbol in the middle, a Title 2 bold title, a Title 2 secondary descriptionA 40dp primary symbol at the start, a Headline Small title, a Body Large description

API

IntroHeader

PropTypeDefaultDescription
titleReactNode—The step's title, read as a header: Title 2 bold on iOS, Headline Small on Android (required)
titleLine{ fontSize: number; lineHeight: number }—The size and line of a title the app sets itself (its own display face, a Text of its own in title): the title takes them, and the description stands under it by the pair's gap (titleDescriptionGap)
descriptionReactNode—What the step asks, right under the title: Title 2 in the secondary label on iOS, Body Large 16 under it on Android
descriptionVariant"title2" | "body""title2" on iOS, "body" on AndroidThe description's text style: iOS's steps' Title 2, or body (iOS 17/22, Android's Body Large 16/24), then under the title by the pair's gap
mediaReactNode—A symbol or picture over the title: in the middle on iOS (a kit icon 80pt in the accent), at the start on Android (40dp in the primary)
stepsReactNode—Steps over everything else, such as a minimal ProgressSteps, 16 over the rest (--intro-header-steps-gap)
childrenReactNode—Content under the description, such as a hint or a line of links, as far under it as the description is under the title (--intro-header-children-gap)
align"cells" | "text""cells"What the text lines up with: the column of the content under it, or the text inside its cells (the rows' inset in: 20pt, 21dp)
testIDstring—Test id
styleStyleProp<ViewStyle>—Style of the header

An app's own header

An app that sets its own title, for example a display face of its brand at 32/32, passes it as title and tells its size and line with titleLine. A body description (descriptionVariant="body") then stands under it by the pair's gap, as under Empty Message's title told the same way: the description's words are as far under the title's as its own lines are apart. steps stand over the rest, and children (a hint, a line of links) stand under the description at the same gap.

Each gap inside the header is a token a brand can set:

  • --intro-header-steps-gap: under the steps, 16.
  • --intro-header-media-gap: under the symbol's box on iOS, 24.
  • --intro-header-media-gap-android: the same on Android, 16.
  • --intro-header-children-gap: over the children. By default it is the same as the description's gap.

The header keeps no space around it. usePageMetrics() gives the screen's spacing:

  • introTop: over a header that opens with its symbol, --page-intro-top (8).
  • headingTop: over one that opens with its title or steps, --page-heading-top (16).
  • introEnd: under the header, before the content, --page-intro-end (24).