import React, { type ReactNode } from 'react'; type Separators = '|' | '>' | '/'; type ReactChildArray = ReturnType; export declare function flattenReactChildren(children: ReactNode): ReactChildArray; type Props = { /** * aria-label for `nav` element to describe Breadcrumbs navigation to screen readers */ 'aria-label'?: string; /** * Child node(s) that can be nested inside component */ children?: ReactNode; /** * CSS class names that can be appended to the component */ className?: string; /** * HTML id for the component */ id?: string; /** * Custom string separator between individual breadcrumbs * * **Defaults to `"/"`**. */ separator?: Separators; }; /** * ## Usage * * Navigation component used to show hierarchical position and depth of content in a webpage or * application. Can show all available links in the hierarchy, or collapse the links into a menu * as needed. * * | Type/Use | Description | Example | * |----------|-------------|---------| * | Full trail | Every ancestor is shown as its own link, separated by `separator`. | Shallow hierarchies that fit the available width. | * | Collapsed | Middle items move into a `Menu` behind an ellipsis when the trail would overflow. | Deep hierarchies. Narrow containers. | * | Back | The parent page is shown as a single back arrow at small breakpoints. | Mobile and other narrow viewports. | * * ### Best Practices * * * Use brief text for breadcrumb item text descriptions. * * ## Interaction * * Each item in `Breadcrumbs` represents one anchor which leads to a parent page in the hierarchy. * Adjacent pages in the information architecture will have the same exact ancestors. * * ## Content & Accessibility * * ### Do's * * * Use `Breadcrumbs` when pages have a tree structure resulting in 1-3 topmost parent pages, and many children per parent. * * ### Don'ts * * * Avoid having breadcrumbs with hierarchies greater than 10 ancestors. Consider a custom sub-navigation, more top-level links in `AppHeader`, or other grouping to avoid such deep hierarchies. * * Don't go beyond 1-3 words for the text of each breadcrumb. * * ## Resources * * * https://www.nngroup.com/articles/breadcrumbs/ */ export declare const Breadcrumbs: { ({ "aria-label": ariaLabel, className, children, id, separator, ...other }: Props): React.JSX.Element; displayName: string; Item: { (props: React.ComponentProps): React.JSX.Element; displayName: string; }; }; type BreadcrumbItemProps = { /** * CSS class names that can be appended to the component. */ className?: string; /** * URL for the breadcrumbs item. * Required since breadcrumbs should reroute user. * Null case is used for the collapsed variant, which uses Menu Items which has hrefs. */ href: string | null; /** * URLs for the collapsed breadcrumbs variant. * Should be {text}. */ menuItems?: ReactNode[]; /** * Custom string separator after current breadcrumb item. * Defaults to '/' */ separator?: Separators; /** * Breadcrumbs item text. */ text?: string; /** * Behavior variations for the breadcrumbs item. * - **back** - results in a left facing icon, usually denoting the second last breadcrumb item in a mobile breakpoint. * - **collapsed** - results in an ellipsis, where interaction spawns a Menu containing more links. */ variant?: 'back' | 'collapsed'; }; /** * A single breadcrumb subcomponent, to be used in the Breadcrumbs component. */ export declare const BreadcrumbsItem: (props: BreadcrumbItemProps) => React.JSX.Element; export {};