- Label
- Icon label
- Field
- Form
- Frontmatter form
- Questionnaire
- Input
- Input group
- Input OTP
- Password input
- Password strength
- Code input
- Number field
- Tag input
- Textarea
- Checkbox
- Radio group
- Language toggle group
- Emoji appearance toggle group
- Emoji picker
- Avatar picker
- AI provider picker
- Select
- Native select
- Combobox
- Language combobox
- Slider
- Calendar
- Switch
- Alert
- Avatar
- Badge
- Card
- AI provider card
- Model info card
- Model list
- Empty
- Item
- Tree item
- File tree
- Icon media
- File type icon
- Font preview
- Image preview
- Kbd
- Table
- Data table
- Data table column header
- Chart
- Code Block
- Code card
- Markdown view
- Attachment
- Bubble
- Marker
- Message
- Chat message
- Chat suggestion item
- Message scroller
- Trace
- Progress
- Spinner
- Sonner
- Toast
- Unsaved changes toolbar
- Unsaved indicator
- Status indicator
- Permission card
- Separator
- Skeleton
- Animated grid pattern
- Meteors
Installation#
pnpm dlx shadcn@latest add @zui/breadcrumbThe CLI writes components/ui/breadcrumb.tsx, installs Direction, Text,
Icon and Utils, and adds lucide-react-native.
Usage#
import { Link } from 'expo-router';
import {
Breadcrumb,
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
} from '@/components/ui/breadcrumb';<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem>
<BreadcrumbLink asChild>
<Link href="/">Home</Link>
</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbPage>Settings</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>API reference#
Breadcrumb#
Takes every prop of React Native's View. It is a navigation landmark named Breadcrumb; pass aria-label
to name it otherwise.
BreadcrumbList, BreadcrumbItem#
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.
BreadcrumbLink#
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.
BreadcrumbPage#
Takes every prop of Text. It is the current screen, announced as a disabled link marked as the current page, in the foreground colour.
BreadcrumbSeparator#
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.
BreadcrumbEllipsis#
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
renderprop for a router's link. The native one takesasChild, 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.