ZUI

Search documentation

Find a page or a heading.

Breadcrumb

The trail from the top of the app to the current screen.

Installation

bash

The CLI writes components/ui/breadcrumb.tsx, installs Direction, Text, Icon and Utils, and adds lucide-react-native.

Usage

tsx
tsx

API reference

Takes every prop of React Native's View. It is a navigation landmark named Breadcrumb; pass aria-label to name it otherwise.

Each takes every prop of React Native's View. BreadcrumbList is a list laid out in a wrapping row of muted small text, and each BreadcrumbItem is a listitem.

Takes every prop of Text. It is announced as a link, and onPress navigates. With asChild, it renders its single child instead, such as expo-router's Link, with the link's classes merged on.

Takes every prop of Text. It is the current screen, announced as a disabled link marked as the current page, in the foreground colour.

Takes every prop of React Native's View. It draws a chevron unless given children, such as a slash in a Text, and is hidden from screen readers.

Takes every prop of React Native's View. It draws three dots for the steps a long trail leaves out, and is hidden from screen readers.

Right to left

The separator's chevron is mirrored when Direction says text reads right to left, so it points to the next step, as upstream's cn-rtl-flip does.

Differences from upstream

  • Upstream's BreadcrumbLink takes a render prop for a router's link. The native one takes asChild, as React Native's Text in this registry does.
  • iOS and Android have no current-page state, so a screen reader there announces the page as a disabled link. On the web the page carries aria-current="page", as upstream's does.
  • Upstream widens the gap between steps on screens wider than a phone. The native trail keeps the narrow gap.
  • Upstream flips the chevron in a right-to-left layout. The native chevron always points right.