Primitives
Animated Number Avatar Badge Button Button Group Toggle Toggle Group Checkbox Chip Countdown Divider Fab Grid Icon Image Input Search Input Textarea Label Loader Marquee Masked Input Message Bubble Notification Banner Offline Banner Progress Progress Ring Radio Group Range Slider Rating Separator Skeleton Slider Stack Stepper Switch Text Theme Toggle Ticker Typing IndicatorComposed
Accordion Achievement Badge Action Bar Action Sheet Action Swap Activity Rings Add to Cart Button Address Card Agenda List Alert Amount Keypad Animated Icons App Bar Audio Message Audio Recorder Autocomplete Avatar Group Balance Display Bar List Barcode Before After Biometric Gate Bloom Menu Bottom Sheet Paywall Sheet Side Sheet Breadcrumb Calendar Calendar Strip Card Carousel Cart Item Character Charts Chat Composer Chat List Item Choice Card Circle Reveal Coach Marks Collapsible Collapsible Header Color Picker Combobox Command Palette Comment Thread Confetti Consent Sheet Context Menu Copy Field Country Picker Coupon Input Currency Input Data Table Date Range Picker Day Schedule Dialog Dock Donut Chart Drawer Driver Card Dropdown Menu Drum Picker Emoji Picker Empty State Error State Event Card Expandable Control Fader Feature Gate File Picker Filter Bar Follow Button Form Gauge Glass Glass Cluster Glass Dock Morph Glass Fab Morph Glass Lab Glass Orb Glass Search Morph Glass Sheet Edge Gradient Button Headline New Heatmap Image Cropper Image Viewer Kanban Card Keyboard Avoiding Keyboard Toolbar Leaderboard Level Progress Lightbox Like Button Line Chart List Reorderable List Swipeable Row Location Card Location Search Map Sheet Map View Markdown View Media Controls Media Picker Media Tile Mention Input Meter Bar Mini Player Mood Slider Morphing Modal Multi Select Navigation Rail Notification Item Number Input Onboarding Pager Order Card Order Summary OTP Input Pagination Paper Clip New Parallax Header Pass Card Password Strength Payment Button Payment Card Payment Method Permission Primer Phone Input PIN Pad Polaroid New Poll Popover Post Card Postage Stamp New Price Tag Pricing Table Product Card Product Gallery Profile Header Promo Banner Prompt Input Property Card Pull To Refresh QR Code Quick Actions Quick Replies Rating Summary Reaction Picker Resend Timer Review Card Review Prompt Ride Option Save Button Scan Frame Scroll Spy Tabs Seat Map Section Header Section Index Segmented Control Select Share Button Share Sheet Shutter Button Signature Pad Slide to Confirm Slot Picker Smart Banner Social Login Button Sparkline Splash Screen Split Button Stat Card Stateful Button Status Dot Step Flow Steps Sticker New Stopwatch Stories Progress Stories Viewer Story Ring Streak Counter Streaming Text Success Seal Swipe Deck Tabs Tag Input Tape New Text Reveal Thinking Indicator Time Picker Timeline Timer Ring Tip Selector Toast Toolbar Tooltip Track Row Transaction Row Trip Progress Variant Picker Video Controls Waveform Weather Card Weekday Picker Zoom TransitionScreens
Account Switcher Biometric Setup Delete Account Forgot Password Grow Auth Login Login — Dark Stage Login — Dense Work Login — Editorial Login — Illustrated Login — Minimal Ink Login — Social Login — Video Loop Food Onboarding Onboarding Onboarding Dark Objects Onboarding Editorial Onboarding Illustrated Onboarding Personalize Onboarding Photo Carousel OTP Verification Passkey — Create Password Reset Permission — Notifications Phone Verification Onboarding Quiz Session Devices Signup Sign-up Chat Sign-up Photo Sheet Social Auth Split Auth Verify Identity Welcome AI Chat AI Assistant Channels List Chat Info Chat List Chat Media Chat Thread Create Group Group Info Message Requests New Message Kept Messages Accessibility Activity Log Appearance Authenticator Blocked Accounts Export Your Data Downloads Edit Profile Edit Profile — Rows Emergency Call Empty States Set Error State Send Feedback Device Locator Help Center Home — Bento Home — Dark Home — Editorial Home Feed Invite Friends Language & Region Linked Accounts Not Found (404) Notification Settings Notifications Password Vault Paywall Paywall — Comparison Paywall — Dark Stage Paywall — Editorial Paywall — Photo Paywall — Trial Timeline Privacy Profile Profile — Gamified Profile — Minimal Profile — Photo Hero QR Scanner Report Issue Saved Items Phone Time Search Search — Command Palette Search — Visual Account Health Settings Settings — Dark Device Settings — Search Storage & Data Terms & Privacy Dating Chat Dating Filters Profile Discover Its A Match Into You Matches Profile Detail Profile Editor Courier Matching Delivery History Delivery Support Package Schedule Parcel Tracking Proof Of Delivery Quick Aisle Quick Home Send Package Substitutions Add Payment Address Book Cart Categories Checkout Checkout — Steps Checkout Success Delivery Filters & Sort Flash Sale Gift Cards Loyalty Points Order Cancel Order Detail Orders Pay Later Checkout Payment Methods Product Detail Product Detail — Hero Product Grid Product Reviews Promo Codes Recently Viewed Return Items Search Results Shop Assistant Store Home Tip & Rate Courier Order Tracking Wishlist Write a Review Event Checkin Event Hero Events Discover My Tickets Seat Selection Ticket Checkout Add Card Bank Accounts Dashboard — Bento Bill Pay Budgets Card Details Crypto Portfolio Finance Dashboard Dashboard — Dark Exchange Currency Expense List Invoice Detail Manage Cards Plan Management Savings Goals Send Money Spending Analytics Split Bill Subscriptions Token Detail Token Swap Transactions Wallet Home Wallet Movers Courier Tracking Food Cart Food Home Food Orders Grocery List Recipe Detail Restaurant — Dark Restaurant Detail Activity Rings Fitness Home Habit Quest Habit Tracker Meal Planner Med Store Meditation Player Mood Check-in Nutrition Home Period Tracker Prior Auth Prior Auth Cases Quest Complete Run Tracking Rx Scan Sleep Tracker Telehealth Booking Walk Map Water Tracker Workout Complete Workout Detail Workout Session Applications Apply Company Interview Schedule Job Detail Job Feed Resume Saved Jobs Create Listing Item Chat Listing Detail Make Offer Market Checkout Market Home Market Search My Listings Offers Inbox Seller Profile Audiobook Player Camera Gallery Albums Game Store Mini Player Music Player Photo Editor Photo Gallery Playlist Detail Podcast Player Clips Feed Serene Home Sound Mixer Stories Video Call Video Player Article Reader Course Detail Event Detail Memory Onboarding Icon Lab Leaderboard Lesson Player Match Detail News Editorial News Home Plant Care Prediction Live Prediction Welcome Smart Home Standings Ticket Wallet Topics Follow Weather Detail Add Task Sheet Alarm Clock Calendar Day Calendar Month Doc Scanner File Manager Focus Timer Journal Kanban Board Mail Inbox Mail Thread Note Editor Notes List Reminders Task List Time Blocks Agent Profile Compare Homes Mortgage Calculator Property Detail Rental Application Saved Homes Schedule Tour Search List Search Map Complete Destination Driver Arriving Ev Charging History Home In Trip Matching Options Parking Receipt Safety Schedule Scooter Unlock Booking Confirmed Booking Review Booking Slots My Bookings Pro On The Way Provider Detail Provider List Rate Service Services Home Arc Create Arc Detail Arc Onboarding Avatar Creator Comments Sheet Create Post Explore Grid Followers List Hashtag Feed Mentions Post Detail Post Hero Social Profile Boarding Pass Booking Confirm Car Rental Trip Discover Flight Live Flight Preferences Flight Results Flight Search Hotel Detail Live Transit Trip — Map Day Trip — Rideshare Request Seat Select Travel Home Trip Itinerary Trip OnboardingNothing matches — try another word.
Breadcrumb
Navigation trail with the current page in full ink and earlier levels muted. New levels rise into place, going back fades crumbs away, and a collapsed “…” opens to show hidden levels.
Preview
import * as React from "react";
import { createContext, forwardRef, useContext } from "react";
import { View, Pressable, type ViewProps } from "react-native";
import Animated, {
Easing,
FadeOut,
LinearTransition,
interpolateColor,
useAnimatedStyle,
useSharedValue,
withDelay,
withSpring,
withTiming,
} from "react-native-reanimated";
import {
cn,
ease,
rowDelay,
spring,
timing,
useHaptic,
usePressAnimation,
useReducedMotion,
useTheme,
AnimatedPressable,
} from "@lumioui/core";
import { Icon } from "../icon";
/** Root → crumb haptic channel so the compound (<Breadcrumb.Item>) path
* fires the same haptic as the data-driven path. */
type CrumbHaptic = "selection" | "light" | false;
const HapticCtx = createContext<CrumbHaptic>("selection");
/** A pushed crumb rises into the trail from this far below — the new level travels up. */
const CRUMB_RISE = 6;
/** Dropped crumbs dim right to left on the menu rhythm (§5b rows 24ms apart). */
const DROP_STAGGER = 24;
const igniteTiming = { ...timing.fast, easing: Easing.bezier(...ease.out) };
export interface BreadcrumbItemData {
label: string;
/** Tap handler — ignored on the last item (the current page). */
onPress?: () => void;
/** Overrides the default a11y label (the item label). */
accessibilityLabel?: string;
}
export interface BreadcrumbProps extends Omit<ViewProps, "className" | "children"> {
/** Data-driven trail — last item renders as the current page. */
items?: BreadcrumbItemData[];
/** Collapse middle items into a "…" button when the trail exceeds this. Default none. */
maxItems?: number;
/** Fired when the "…" button is pressed, after the trail expands. */
onEllipsisPress?: (hidden: BreadcrumbItemData[]) => void;
/** Haptic on crumb taps. Default "selection". */
haptic?: "selection" | "light" | false;
/** Compound composition: <Breadcrumb.Item> children, separators auto-inserted. */
children?: React.ReactNode;
className?: string;
}
/**
* One crumb with the separator in front of it. Crumbs that mount after the
* trail does switch on (a pushed level rises in; unfolded levels ignite 40ms
* apart); the rest slide over on a layout spring; dropped crumbs dim in place.
*/
function CrumbSlot({
arrive,
delay,
exitDelay,
children,
}: {
arrive: boolean;
delay: number;
exitDelay: number;
children: React.ReactNode;
}) {
const reduce = useReducedMotion();
const lit = useSharedValue(arrive ? 0 : 1);
const rise = useSharedValue(arrive && !reduce ? CRUMB_RISE : 0);
React.useEffect(() => {
if (!arrive) return;
lit.value = withDelay(delay, withTiming(1, igniteTiming));
if (!reduce) rise.value = withDelay(delay, withSpring(0, spring.surface));
// Arrival plays once, on mount.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const style = useAnimatedStyle(() => ({
opacity: lit.value,
transform: [{ translateY: rise.value }],
}));
return (
<Animated.View
style={style}
layout={reduce ? undefined : LinearTransition.springify().damping(spring.layout.damping).stiffness(spring.layout.stiffness)}
exiting={FadeOut.duration(timing.recede.duration).delay(exitDelay)}
className="flex-row items-center"
>
{children}
</Animated.View>
);
}
/**
* Breadcrumb — nav trail with chevron separators. The current page is lit in
* ink, ancestors stay dim; middle items collapse into "…". A pushed level
* rises into the trail, popping back dims the dropped crumbs right to left,
* and unfolding the ellipsis opens the gap while hidden levels ignite.
* <Breadcrumb items={[{ label: "Home" }, { label: "Library" }, { label: "Kyoto" }]} />
* <Breadcrumb><Breadcrumb.Item onPress={…}>Home</Breadcrumb.Item>…</Breadcrumb>
* Expo Go compatible.
*/
export const BreadcrumbRoot = forwardRef<React.ElementRef<typeof View>, BreadcrumbProps>(
function Breadcrumb(
{ items, maxItems, onEllipsisPress, haptic = "selection", children, className, ...props },
ref,
) {
const [expanded, setExpanded] = React.useState(false);
// Keys on screen last commit — anything new after mount arrives.
const seen = React.useRef<Set<string> | null>(null);
const firstCommit = seen.current === null;
const slots: { key: string; node: React.ReactNode }[] = [];
if (items && items.length > 0) {
const collapse = !expanded && maxItems != null && items.length > maxItems;
const tail = collapse ? items.length - (maxItems! - 1) : 1;
const hidden = collapse ? items.slice(1, tail) : [];
// Keep each crumb's original index in its key so expanding doesn't remount the kept ones.
const rendered: (number | null)[] = collapse
? [0, null, ...items.slice(tail).map((_, k) => tail + k)]
: items.map((_, i) => i);
rendered.forEach((idx, i) => {
if (idx == null) {
slots.push({
key: "__ellipsis__",
node: (
<BreadcrumbEllipsis
onPress={() => {
setExpanded(true);
onEllipsisPress?.(hidden);
}}
/>
),
});
return;
}
const item = items[idx]!;
const isLast = i === rendered.length - 1;
slots.push({
key: `${item.label}-${idx}`,
node: (
<BreadcrumbItem
current={isLast}
accessibilityLabel={item.accessibilityLabel}
onPress={() => {
if (isLast) return;
item.onPress?.();
}}
>
{item.label}
</BreadcrumbItem>
),
});
});
} else if (children != null) {
// Children.toArray already drops null/undefined/booleans and assigns keys.
React.Children.toArray(children).forEach((child, i) => {
const key = React.isValidElement(child) && child.key != null ? String(child.key) : `crumb-${i}`;
slots.push({ key, node: child });
});
}
React.useEffect(() => {
seen.current = new Set(slots.map((s) => s.key));
});
let arrivals = 0;
const n = slots.length;
return (
<HapticCtx.Provider value={haptic}>
<View
ref={ref}
// Breadcrumbs are a nav landmark: role="navigation" (ARIA) +
// an explicit label — the bare row otherwise reads as loose text.
role="navigation"
accessibilityLabel="Breadcrumb"
className={cn("min-h-11 w-full flex-row flex-wrap items-center", className)}
{...props}
>
{slots.map((slot, i) => {
const arrive = !firstCommit && !seen.current!.has(slot.key);
const delay = arrive ? rowDelay(arrivals++) : 0;
return (
<CrumbSlot key={slot.key} arrive={arrive} delay={delay} exitDelay={(n - 1 - i) * DROP_STAGGER}>
{/* Separators sit in front of every crumb but the first. */}
{i > 0 ? <BreadcrumbSeparator /> : null}
{slot.node}
</CrumbSlot>
);
})}
</View>
</HapticCtx.Provider>
);
},
);
export interface BreadcrumbItemProps {
/** Current page — non-interactive, lit in ink. */
current?: boolean;
onPress?: () => void;
accessibilityLabel?: string;
children?: React.ReactNode;
className?: string;
}
export const BreadcrumbItem = forwardRef<React.ElementRef<typeof Pressable>, BreadcrumbItemProps>(
function BreadcrumbItem({ current, onPress, accessibilityLabel, children, className }, ref) {
const press = usePressAnimation({ pressedScale: 0.96, pressedOpacity: 0.55, fast: true });
const haptics = useHaptic();
const haptic = useContext(HapticCtx);
const { colors } = useTheme();
const text = typeof children === "string" ? children : undefined;
const still = current || !onPress;
// Light, not weight: the current crumb brightens to ink, ancestors dim.
const lit = useSharedValue(current ? 1 : 0);
React.useEffect(() => {
lit.value = withTiming(current ? 1 : 0, { ...timing.normal, easing: Easing.bezier(...ease.inOut) });
}, [current, lit]);
const dim = colors.mutedForeground;
const ink = colors.foreground;
const inkStyle = useAnimatedStyle(() => ({
color: interpolateColor(lit.value, [0, 1], [dim, ink]),
}));
return (
<AnimatedPressable
ref={ref}
disabled={still}
onPress={() => {
if (still) return;
if (haptic) haptics.fire(haptic);
onPress?.();
}}
onPressIn={press.onPressIn}
onPressOut={press.onPressOut}
style={press.animatedStyle}
hitSlop={6}
className={cn("min-h-11 justify-center py-1", className)}
// The current page is deliberately plain text, not a link — it can't
// navigate. accessibilityState.selected + aria-current carry the
// "you are here" semantics instead.
accessibilityRole={still ? "text" : "link"}
accessibilityState={current ? { selected: true } : undefined}
aria-current={current ? "page" : undefined}
accessibilityLabel={accessibilityLabel ?? text}
>
<Animated.Text className="text-[15px] font-medium" style={inkStyle} numberOfLines={1}>
{children}
</Animated.Text>
</AnimatedPressable>
);
},
);
export interface BreadcrumbSeparatorProps {
className?: string;
}
/** Chevron between crumbs — decorative, hidden from screen readers. */
export const BreadcrumbSeparator = forwardRef<React.ElementRef<typeof View>, BreadcrumbSeparatorProps>(
function BreadcrumbSeparator({ className }, ref) {
return (
<View
ref={ref}
className={cn("h-11 items-center justify-center px-1", className)}
accessibilityElementsHidden
importantForAccessibility="no"
>
<Icon name="chevron-right" size="sm" color="mutedForeground" />
</View>
);
},
);
export interface BreadcrumbEllipsisProps {
onPress?: () => void;
className?: string;
}
/** The "…" slot — expands the collapsed trail (or runs a custom handler). */
export const BreadcrumbEllipsis = forwardRef<React.ElementRef<typeof Pressable>, BreadcrumbEllipsisProps>(
function BreadcrumbEllipsis({ onPress, className }, ref) {
const press = usePressAnimation({ pressedScale: 0.9, fast: true });
const haptics = useHaptic();
const haptic = useContext(HapticCtx);
return (
<AnimatedPressable
ref={ref}
onPress={() => {
if (haptic) haptics.fire(haptic);
onPress?.();
}}
onPressIn={press.onPressIn}
onPressOut={press.onPressOut}
style={press.animatedStyle}
hitSlop={6}
className={cn("h-11 min-w-11 items-center justify-center", className)}
accessibilityRole="button"
accessibilityLabel="Show all levels"
>
<Icon name="ellipsis" size="sm" color="mutedForeground" />
</AnimatedPressable>
);
},
);
export const Breadcrumb = Object.assign(BreadcrumbRoot, {
Item: BreadcrumbItem,
Separator: BreadcrumbSeparator,
Ellipsis: BreadcrumbEllipsis,
});
Breadcrumb.displayName = "Breadcrumb";
BreadcrumbItem.displayName = "Breadcrumb.Item";
BreadcrumbSeparator.displayName = "Breadcrumb.Separator";
BreadcrumbEllipsis.displayName = "Breadcrumb.Ellipsis"; import { Breadcrumb } from "@/components/ui/breadcrumb/breadcrumb";
export function Example() {
return (
<Breadcrumb />
);
} Installation
Install the dependencies
npx expo install react-native-reanimatedAdd the components it builds on
Copy the source from the Code tab into your project
components/ui/breadcrumb/breadcrumb.tsxcomponents/ui/breadcrumb/index.tsIcons it renders
Update the import paths to match your project setup.
Usage
import { BreadcrumbRoot, BreadcrumbItem, BreadcrumbSeparator, BreadcrumbEllipsis, Breadcrumb } from "@/components/ui/breadcrumb/breadcrumb"; <Breadcrumb /> Also exported: BreadcrumbRoot, BreadcrumbItem, BreadcrumbSeparator, BreadcrumbEllipsis.
Examples
A team wiki page five levels deep.
import * as React from "react";
import { View } from "react-native";
import { Breadcrumb } from "../breadcrumb";
import { Text } from "../../text/text";
/** BreadcrumbCollapsed — a team wiki page five levels deep. The trail keeps
* the root and the last two levels; tap the ellipsis to unfold the rest. */
export function BreadcrumbCollapsed() {
const [page, setPage] = React.useState("Database failover");
const trail = ["Northbeam", "Engineering", "Platform", "On-call", "Database failover"];
const depth = trail.indexOf(page);
return (
<View className="w-full gap-4 overflow-hidden rounded-3xl bg-card p-5">
<Breadcrumb
maxItems={3}
items={trail.slice(0, depth + 1).map((label, i) =>
i === depth ? { label } : { label, onPress: () => setPage(label) },
)}
/>
<View className="gap-2">
<Text className="text-2xl font-bold tracking-tight">{page}</Text>
<Text className="text-[13px] text-muted-foreground">Edited by Ines Kowalczyk · 3 days ago</Text>
</View>
{page === "Database failover" ? (
<View className="gap-3">
{[
"Page the secondary on-call before promoting a replica.",
"Freeze writes from the admin console, then confirm lag is under 5 s.",
"Promote the east-region replica and rotate the connection string.",
].map((line, i) => (
<View key={line} className="flex-row gap-3">
<Text className="w-5 text-[15px] font-semibold tabular-nums text-muted-foreground">{i + 1}.</Text>
<Text className="flex-1 text-[15px] leading-[22px]">{line}</Text>
</View>
))}
</View>
) : (
<View className="gap-2">
<Text className="text-[15px] leading-[22px] text-muted-foreground">
{trail.length - depth - 1} pages below this one.
</Text>
<Text
className="text-[15px] font-semibold text-primary-text"
accessibilityRole="link"
onPress={() => setPage("Database failover")}
>
Back to Database failover
</Text>
</View>
)}
</View>
);
} A file browser path.
import * as React from "react";
import { View } from "react-native";
import Animated, { Easing, useAnimatedStyle, useSharedValue, withSpring, withTiming } from "react-native-reanimated";
import { BAND_STAGGER, SwitchOn, ease, spring, timing, useReducedMotion } from "@lumioui/core";
import { Breadcrumb } from "../breadcrumb";
import { List } from "../../list/list";
import { Icon, type IconName } from "../../icon/icon";
type Entry = { name: string; meta: string; icon: IconName; tile: string; folder?: boolean };
const TREE: Record<string, Entry[]> = {
"Files": [
{ name: "Studio Kova", meta: "Shared · 41 items", icon: "briefcase", tile: "bg-tint-teal", folder: true },
{ name: "Taxes 2025", meta: "12 items", icon: "landmark", tile: "bg-slate-500", folder: true },
{ name: "Lease renewal.pdf", meta: "1.2 MB · Sep 30", icon: "file-text", tile: "bg-tint-red" },
],
"Studio Kova": [
{ name: "Clients", meta: "8 folders", icon: "users", tile: "bg-tint-teal", folder: true },
{ name: "Brand assets", meta: "214 items", icon: "palette", tile: "bg-tint-amber", folder: true },
{ name: "Rate card 2026.pdf", meta: "380 KB · Oct 3", icon: "file-text", tile: "bg-tint-red" },
],
Clients: [
{ name: "Halden Running", meta: "Spring campaign · 26 items", icon: "footprints", tile: "bg-tint-green", folder: true },
{ name: "Paperline", meta: "Packaging · 9 items", icon: "book-open", tile: "bg-tint-orange", folder: true },
],
"Halden Running": [
{ name: "Hero shoot selects", meta: "48 photos", icon: "image", tile: "bg-tint-pink", folder: false },
{ name: "Launch brief v3.doc", meta: "88 KB · edited 2h ago", icon: "file-text", tile: "bg-tint-teal" },
{ name: "Storyboard.mov", meta: "212 MB · 0:42", icon: "film", tile: "bg-tint-amber" },
],
};
/** The folder heading swaps in place: the old name dims while the new one ignites. */
function Heading({ title }: { title: string }) {
const reduce = useReducedMotion();
const lit = useSharedValue(1);
const grow = useSharedValue(1);
const first = React.useRef(true);
React.useEffect(() => {
if (first.current) {
first.current = false;
return;
}
lit.value = 0;
lit.value = withTiming(1, { ...timing.fast, easing: Easing.bezier(...ease.out) });
if (reduce) return;
grow.value = SWAP_FROM;
grow.value = withSpring(1, spring.swap);
}, [title, reduce, lit, grow]);
const style = useAnimatedStyle(() => ({
opacity: lit.value,
transform: [{ scale: grow.value }],
}));
return (
<Animated.Text
className="pb-3 pt-1 text-3xl font-bold tracking-tight text-foreground"
style={[{ transformOrigin: "left center" }, style]}
accessibilityRole="header"
numberOfLines={1}
>
{title}
</Animated.Text>
);
}
/** Headings ignite from this scale (swap grammar). */
const SWAP_FROM = 0.96;
/** BreadcrumbTrail — a file browser path. Tap a folder and its name rises
* into the trail as the new lit crumb while the heading swaps in place and
* the folder's rows switch on; tap any crumb to jump back up and the
* dropped levels dim right to left. */
export function BreadcrumbTrail() {
const [path, setPath] = React.useState(["Files", "Studio Kova"]);
const here = path[path.length - 1]!;
const entries = TREE[here] ?? [];
return (
<View className="w-full overflow-hidden rounded-3xl bg-background pb-2 pt-4">
<View className="px-4">
<Breadcrumb
items={path.map((label, i) =>
i === path.length - 1
? { label }
: { label, onPress: () => setPath(path.slice(0, i + 1)) },
)}
/>
<Heading title={here} />
</View>
{/* The folder's contents switch on one band behind the crumb and heading. */}
<SwitchOn key={here} delay={BAND_STAGGER}>
<List inset>
<List.Section>
{entries.map((e, i) => (
<React.Fragment key={e.name}>
{i > 0 ? <List.Separator inset={68} /> : null}
<List.Item
title={e.name}
subtitle={e.meta}
leading={
<View className={`h-10 w-10 items-center justify-center rounded-xl ${e.tile}`}>
<Icon name={e.icon} size="md" color="#FFFFFF" />
</View>
}
showChevron={!!e.folder && !!TREE[e.name]}
onPress={TREE[e.name] ? () => setPath([...path, e.name]) : undefined}
/>
</React.Fragment>
))}
</List.Section>
</List>
</SwitchOn>
</View>
);
} API reference
Breadcrumb
items BreadcrumbItemData[] Data-driven trail — last item renders as the current page.
—maxItems number Collapse middle items into a "…" button when the trail exceeds this. Default none.
—onEllipsisPress (hidden: BreadcrumbItemData[]) => void Fired when the "…" button is pressed, after the trail expands.
—haptic "selection" | "light" | false Haptic on crumb taps. Default "selection".
—children React.ReactNode Compound composition: <Breadcrumb.Item> children, separators auto-inserted.
—className string — BreadcrumbItem
current boolean Current page — non-interactive, lit in ink.
—onPress () => void — accessibilityLabel string — children React.ReactNode — className string — BreadcrumbSeparator
className string — BreadcrumbEllipsis
onPress () => void — className string —