For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/zh/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/zh/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/zh/components/breadcrumb.md.
v0.0.57
  • 简体中文
  • Breadcrumb

    导航@rockshin/tao-ui

    展示用户当前所处的页面或视图层级。

    何时使用

    当用户需要理解并返回多层级上下文时,将 Breadcrumb 放在页面内容顶部。

    推荐

    • 标签保持简短且易识别。
    • 祖先节点使用链接,当前节点使用普通文本。

    避免

    • 不要把 Breadcrumb 当作主导航。

    代码演示

    API

    属性说明类型默认值
    itemsBreadcrumb path, root first. The last item renders as the current page.BreadcrumbItemType[] (必填)-
    separatorSeparator between items. Defaults to a chevron, like shadcn.ReactNode-
    maxItemsCollapse the middle of long paths into an ellipsis once the number of items exceeds this value. Shows the first item and the last maxItems - 1 items.number | undefined-
    itemRenderCustom renderer for an item's content. Return a React element (e.g. a router <Link>) and its props are merged onto the breadcrumb link via Radix Slot — no extra <a> wrapper is added.((item: BreadcrumbItemType, info: { index: number; isLast: boolean; items: BreadcrumbItemType[]; }) => ReactNode) | undefined-
    className节点类名string | undefined-
    style节点样式CSSProperties | undefined-