Component

Breadcrumb

安装 Installation

npx timkit add breadcrumb --yes --framework react

用法 Usage

import { Breadcrumb } from "@/components/ui/breadcrumb"

className 与 variant、size 可以一起用。字段以 timkit agent inspect breadcrumb --json 的 props 为准。

示例

Examples

一次看一个示例。左侧按名称筛选,预览里可切换源码和框架。

8 / 8

Breadcrumb · Interactive State · 01

Loading preview...

结构化 API

Structured API

与 UCS schema 对齐的 props、逻辑机与多框架运行时。

Component

breadcrumb

Logic

none

Runtime Frameworks

ReactVueWeappHTML

Supported Platforms

WebWeChat Mini Program

Configuration

PropTypeDefaultDescription
logic.provider*
enum (zag | native | none)
noneState and interaction provider used by this component.
logic.machine
string
-Underlying state machine identifier when provider is zag.
platforms*
array
Web, WeChat Mini ProgramPlatforms officially supported by this schema.
frameworks*
array
React, Vue, Weapp, HTMLFramework demos/code currently available in registry files.
dependencies
array
@timui/coreRuntime package dependencies required by this registry item.
optionalPeerDependencies
array
-Optional peer dependencies used by this registry item.
registryDependencies
array
-Dependent Timkit registry components/hook entries.

Props

PropTypeDefaultDescription
separator
string
/The character used to separate multiple values or visual segments.
disabled
boolean
falseWhen true, crumb navigation is ignored.

Slots

PropTypeDefaultDescription
default
slot
-The breadcrumb items

Parts

PropTypeDefaultDescription
root*
root
-The breadcrumb container
list
part
-The list of items
item
part
-A single item
link
part
-A link item
page
part
-The current page item
separator
part
-The separator between items
ellipsis
part
-The ellipsis item
This API reference is generated from `/packages/core` component schemas to keep React/Vue/Weapp docs consistent.

该组件尚无扩展说明文档。

键盘与焦点

Keyboard

跨 React、Vue 与小程序共享的交互与可读名称约定。

  • Enter follows a crumb.
  • The current page is visible as Crumb N of the crumb count.
  • A trail with no current page has no crumb status.
  • The current page and a disabled crumb ignore that key and are not in the tab order.
  • In static HTML, the current page is not a tab stop.
  • An omitted name is breadcrumb.
  • A passed aria-label names the navigation.
  • On the mini program, each crumb sits in a list item.
  • The separator is hidden from the name.
  • On the mini program, a disabled breadcrumb sets aria-disabled.

行为契约

Contract

props、默认值和运行时状态。

  • The breadcrumb separator is / unless a separator is passed.
  • A disabled trail ignores crumb navigation.