interface LinkProps {
    about?: string;
    accessKey?: string;
    aria-activedescendant?: string;
    aria-atomic?: Booleanish;
    aria-autocomplete?:
        | "none"
        | "list"
        | "inline"
        | "both";
    aria-braillelabel?: string;
    aria-brailleroledescription?: string;
    aria-busy?: Booleanish;
    aria-checked?:
        | boolean
        | "true"
        | "false"
        | "mixed";
    aria-colcount?: number;
    aria-colindex?: number;
    aria-colindextext?: string;
    aria-colspan?: number;
    aria-controls?: string;
    aria-current?:
        | boolean
        | "time"
        | "true"
        | "location"
        | "page"
        | "step"
        | "false"
        | "date";
    aria-describedby?: string;
    aria-description?: string;
    aria-details?: string;
    aria-disabled?: Booleanish;
    aria-dropeffect?:
        | "link"
        | "copy"
        | "none"
        | "execute"
        | "move"
        | "popup";
    aria-errormessage?: string;
    aria-expanded?: Booleanish;
    aria-flowto?: string;
    aria-grabbed?: Booleanish;
    aria-haspopup?:
        | boolean
        | "dialog"
        | "menu"
        | "true"
        | "false"
        | "grid"
        | "listbox"
        | "tree";
    aria-hidden?: Booleanish;
    aria-invalid?:
        | boolean
        | "true"
        | "false"
        | "grammar"
        | "spelling";
    aria-keyshortcuts?: string;
    aria-label?: string;
    aria-labelledby?: string;
    aria-level?: number;
    aria-live?: "off" | "assertive" | "polite";
    aria-modal?: Booleanish;
    aria-multiline?: Booleanish;
    aria-multiselectable?: Booleanish;
    aria-orientation?: "horizontal" | "vertical";
    aria-owns?: string;
    aria-placeholder?: string;
    aria-posinset?: number;
    aria-pressed?:
        | boolean
        | "true"
        | "false"
        | "mixed";
    aria-readonly?: Booleanish;
    aria-relevant?:
        | "text"
        | "additions"
        | "additions removals"
        | "additions text"
        | "all"
        | "removals"
        | "removals additions"
        | "removals text"
        | "text additions"
        | "text removals";
    aria-required?: Booleanish;
    aria-roledescription?: string;
    aria-rowcount?: number;
    aria-rowindex?: number;
    aria-rowindextext?: string;
    aria-rowspan?: number;
    aria-selected?: Booleanish;
    aria-setsize?: number;
    aria-sort?:
        | "none"
        | "ascending"
        | "descending"
        | "other";
    aria-valuemax?: number;
    aria-valuemin?: number;
    aria-valuenow?: number;
    aria-valuetext?: string;
    autoCapitalize?: string;
    autoCorrect?: string;
    autoFocus?: boolean;
    autoSave?: string;
    children?: ReactNode;
    className?: string;
    color?: string;
    content?: string;
    contentEditable?: Booleanish | "inherit";
    contextMenu?: string;
    dangerouslySetInnerHTML?: {
        __html: string | TrustedHTML;
    };
    datatype?: string;
    defaultChecked?: boolean;
    defaultValue?: string | number | readonly string[];
    dir?: string;
    discover?: DiscoverBehavior;
    download?: any;
    draggable?: Booleanish;
    hidden?: boolean;
    hrefLang?: string;
    id?: string;
    inlist?: any;
    inputMode?:
        | "search"
        | "text"
        | "url"
        | "none"
        | "tel"
        | "email"
        | "numeric"
        | "decimal";
    is?: string;
    itemID?: string;
    itemProp?: string;
    itemRef?: string;
    itemScope?: boolean;
    itemType?: string;
    lang?: string;
    media?: string;
    nonce?: string;
    onAbort?: ReactEventHandler<HTMLAnchorElement>;
    onAbortCapture?: ReactEventHandler<HTMLAnchorElement>;
    onAnimationEnd?: AnimationEventHandler<HTMLAnchorElement>;
    onAnimationEndCapture?: AnimationEventHandler<HTMLAnchorElement>;
    onAnimationIteration?: AnimationEventHandler<HTMLAnchorElement>;
    onAnimationIterationCapture?: AnimationEventHandler<HTMLAnchorElement>;
    onAnimationStart?: AnimationEventHandler<HTMLAnchorElement>;
    onAnimationStartCapture?: AnimationEventHandler<HTMLAnchorElement>;
    onAuxClick?: MouseEventHandler<HTMLAnchorElement>;
    onAuxClickCapture?: MouseEventHandler<HTMLAnchorElement>;
    onBeforeInput?: FormEventHandler<HTMLAnchorElement>;
    onBeforeInputCapture?: FormEventHandler<HTMLAnchorElement>;
    onBlur?: FocusEventHandler<HTMLAnchorElement>;
    onBlurCapture?: FocusEventHandler<HTMLAnchorElement>;
    onCanPlay?: ReactEventHandler<HTMLAnchorElement>;
    onCanPlayCapture?: ReactEventHandler<HTMLAnchorElement>;
    onCanPlayThrough?: ReactEventHandler<HTMLAnchorElement>;
    onCanPlayThroughCapture?: ReactEventHandler<HTMLAnchorElement>;
    onChange?: FormEventHandler<HTMLAnchorElement>;
    onChangeCapture?: FormEventHandler<HTMLAnchorElement>;
    onClick?: MouseEventHandler<HTMLAnchorElement>;
    onClickCapture?: MouseEventHandler<HTMLAnchorElement>;
    onCompositionEnd?: CompositionEventHandler<HTMLAnchorElement>;
    onCompositionEndCapture?: CompositionEventHandler<HTMLAnchorElement>;
    onCompositionStart?: CompositionEventHandler<HTMLAnchorElement>;
    onCompositionStartCapture?: CompositionEventHandler<HTMLAnchorElement>;
    onCompositionUpdate?: CompositionEventHandler<HTMLAnchorElement>;
    onCompositionUpdateCapture?: CompositionEventHandler<HTMLAnchorElement>;
    onContextMenu?: MouseEventHandler<HTMLAnchorElement>;
    onContextMenuCapture?: MouseEventHandler<HTMLAnchorElement>;
    onCopy?: ClipboardEventHandler<HTMLAnchorElement>;
    onCopyCapture?: ClipboardEventHandler<HTMLAnchorElement>;
    onCut?: ClipboardEventHandler<HTMLAnchorElement>;
    onCutCapture?: ClipboardEventHandler<HTMLAnchorElement>;
    onDoubleClick?: MouseEventHandler<HTMLAnchorElement>;
    onDoubleClickCapture?: MouseEventHandler<HTMLAnchorElement>;
    onDrag?: DragEventHandler<HTMLAnchorElement>;
    onDragCapture?: DragEventHandler<HTMLAnchorElement>;
    onDragEnd?: DragEventHandler<HTMLAnchorElement>;
    onDragEndCapture?: DragEventHandler<HTMLAnchorElement>;
    onDragEnter?: DragEventHandler<HTMLAnchorElement>;
    onDragEnterCapture?: DragEventHandler<HTMLAnchorElement>;
    onDragExit?: DragEventHandler<HTMLAnchorElement>;
    onDragExitCapture?: DragEventHandler<HTMLAnchorElement>;
    onDragLeave?: DragEventHandler<HTMLAnchorElement>;
    onDragLeaveCapture?: DragEventHandler<HTMLAnchorElement>;
    onDragOver?: DragEventHandler<HTMLAnchorElement>;
    onDragOverCapture?: DragEventHandler<HTMLAnchorElement>;
    onDragStart?: DragEventHandler<HTMLAnchorElement>;
    onDragStartCapture?: DragEventHandler<HTMLAnchorElement>;
    onDrop?: 拖放事件处理程序<HTMLAnchorElement>;
    onDropCapture?: 拖放事件处理程序<HTMLAnchorElement>;
    onDurationChange?: React事件处理程序<HTMLAnchorElement>;
    onDurationChangeCapture?: React事件处理程序<HTMLAnchorElement>;
    onEmptied?: React事件处理程序<HTMLAnchorElement>;
    onEmptiedCapture?: React事件处理程序<HTMLAnchorElement>;
    onEncrypted?: React事件处理程序<HTMLAnchorElement>;
    onEncryptedCapture?: React事件处理程序<HTMLAnchorElement>;
    onEnded?: React事件处理程序<HTMLAnchorElement>;
    onEndedCapture?: React事件处理程序<HTMLAnchorElement>;
    onError?: React事件处理程序<HTMLAnchorElement>;
    onErrorCapture?: React事件处理程序<HTMLAnchorElement>;
    onFocus?: 焦点事件处理程序<HTMLAnchorElement>;
    onFocusCapture?: 焦点事件处理程序<HTMLAnchorElement>;
    onGotPointerCapture?: 指针事件处理程序<HTMLAnchorElement>;
    onGotPointerCaptureCapture?: 指针事件处理程序<HTMLAnchorElement>;
    onInput?: 表单事件处理程序<HTMLAnchorElement>;
    onInputCapture?: 表单事件处理程序<HTMLAnchorElement>;
    onInvalid?: 表单事件处理程序<HTMLAnchorElement>;
    onInvalidCapture?: 表单事件处理程序<HTMLAnchorElement>;
    onKeyDown?: 键盘事件处理程序<HTMLAnchorElement>;
    onKeyDownCapture?: 键盘事件处理程序<HTMLAnchorElement>;
    onKeyPress?: 键盘事件处理程序<HTMLAnchorElement>;
    onKeyPressCapture?: 键盘事件处理程序<HTMLAnchorElement>;
    onKeyUp?: 键盘事件处理程序<HTMLAnchorElement>;
    onKeyUpCapture?: 键盘事件处理程序<HTMLAnchorElement>;
    onLoad?: React事件处理程序<HTMLAnchorElement>;
    onLoadCapture?: React事件处理程序<HTMLAnchorElement>;
    onLoadedData?: React事件处理程序<HTMLAnchorElement>;
    onLoadedDataCapture?: React事件处理程序<HTMLAnchorElement>;
    onLoadedMetadata?: React事件处理程序<HTMLAnchorElement>;
    onLoadedMetadataCapture?: React事件处理程序<HTMLAnchorElement>;
    onLoadStart?: React事件处理程序<HTMLAnchorElement>;
    onLoadStartCapture?: React事件处理程序<HTMLAnchorElement>;
    onLostPointerCapture?: 指针事件处理程序<HTMLAnchorElement>;
    onLostPointerCaptureCapture?: 指针事件处理程序<HTMLAnchorElement>;
    onMouseDown?: 鼠标事件处理程序<HTMLAnchorElement>;
    onMouseDownCapture?: 鼠标事件处理程序<HTMLAnchorElement>;
    onMouseEnter?: 鼠标事件处理程序<HTMLAnchorElement>;
    onMouseLeave?: 鼠标事件处理程序<HTMLAnchorElement>;
    onMouseMove?: 鼠标事件处理程序<HTMLAnchorElement>;
    onMouseMoveCapture?: 鼠标事件处理程序<HTMLAnchorElement>;
    onMouseOut?: 鼠标事件处理程序<HTMLAnchorElement>;
    onMouseOutCapture?: 鼠标事件处理程序<HTMLAnchorElement>;
    onMouseOver?: 鼠标事件处理程序<HTMLAnchorElement>;
    onMouseOverCapture?: 鼠标事件处理程序<HTMLAnchorElement>;
    onMouseUp?: 鼠标事件处理程序<HTMLAnchorElement>;
    onMouseUpCapture?: 鼠标事件处理程序<HTMLAnchorElement>;
    onPaste?: 剪贴板事件处理程序<HTMLAnchorElement>;
    onPasteCapture?: 剪贴板事件处理程序<HTMLAnchorElement>;
    onPause?: React事件处理程序<HTMLAnchorElement>;
    onPauseCapture?: React事件处理程序<HTMLAnchorElement>;
    onPlay?: React事件处理程序<HTMLAnchorElement>;
    onPlayCapture?: React事件处理程序<HTMLAnchorElement>;
    onPlaying?: React事件处理程序<HTMLAnchorElement>;
    onPlayingCapture?: React事件处理程序<HTMLAnchorElement>;
    onPointerCancel?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerCancelCapture?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerDown?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerDownCapture?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerEnter?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerEnterCapture?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerLeave?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerLeaveCapture?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerMove?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerMoveCapture?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerOut?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerOutCapture?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerOver?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerOverCapture?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerUp?: 指针事件处理程序<HTMLAnchorElement>;
    onPointerUpCapture?: 指针事件处理程序<HTMLAnchorElement>;
    onProgress?: React事件处理程序<HTMLAnchorElement>;
    onProgressCapture?: React事件处理程序<HTMLAnchorElement>;
    onRateChange?: React事件处理程序<HTMLAnchorElement>;
    onRateChangeCapture?: React事件处理程序<HTMLAnchorElement>;
    onReset?: 表单事件处理程序<HTMLAnchorElement>;
    onResetCapture?: 表单事件处理程序<HTMLAnchorElement>;
    onResize?: React事件处理程序<HTMLAnchorElement>;
    onResizeCapture?: React事件处理程序<HTMLAnchorElement>;
    onScroll?: UI事件处理程序<HTMLAnchorElement>;
    onScrollCapture?: UI事件处理程序<HTMLAnchorElement>;
    onSeeked?: React事件处理程序<HTMLAnchorElement>;
    onSeekedCapture?: React事件处理程序<HTMLAnchorElement>;
    onSeeking?: React事件处理程序<HTMLAnchorElement>;
    onSeekingCapture?: React事件处理程序<HTMLAnchorElement>;
    onSelect?: React事件处理程序<HTMLAnchorElement>;
    onSelectCapture?: React事件处理程序<HTMLAnchorElement>;
    onStalled?: React事件处理程序<HTMLAnchorElement>;
    onStalledCapture?: React事件处理程序<HTMLAnchorElement>;
    onSubmit?: 表单事件处理程序<HTMLAnchorElement>;
    onSubmitCapture?: 表单事件处理程序<HTMLAnchorElement>;
    onSuspend?: React事件处理程序<HTMLAnchorElement>;
    onSuspendCapture?: React事件处理程序<HTMLAnchorElement>;
    onTimeUpdate?: React事件处理程序<HTMLAnchorElement>;
    onTimeUpdateCapture?: React事件处理程序<HTMLAnchorElement>;
    onTouchCancel?: 触摸事件处理程序<HTMLAnchorElement>;
    onTouchCancelCapture?: 触摸事件处理程序<HTMLAnchorElement>;
    onTouchEnd?: 触摸事件处理程序<HTMLAnchorElement>;
    onTouchEndCapture?: 触摸事件处理程序<HTMLAnchorElement>;
    onTouchMove?: 触摸事件处理程序<HTMLAnchorElement>;
    onTouchMoveCapture?: 触摸事件处理程序<HTMLAnchorElement>;
    onTouchStart?: 触摸事件处理程序<HTMLAnchorElement>;
    onTouchStartCapture?: 触摸事件处理程序<HTMLAnchorElement>;
    onTransitionEnd?: 过渡事件处理程序<HTMLAnchorElement>;
    onTransitionEndCapture?: 过渡事件处理程序<HTMLAnchorElement>;
    onVolumeChange?: React事件处理程序<HTMLAnchorElement>;
    onVolumeChangeCapture?: React事件处理程序<HTMLAnchorElement>;
    onWaiting?: React事件处理程序<HTMLAnchorElement>;
    onWaitingCapture?: React事件处理程序<HTMLAnchorElement>;
    onWheel?: 滚轮事件处理程序<HTMLAnchorElement>;
    onWheelCapture?: 滚轮事件处理程序<HTMLAnchorElement>;
    ping?: string;
    placeholder?: 占位符;
    prefetch?: PrefetchBehavior;
    prefix?: string;
    preventScrollReset?: boolean;
    property?: string;
    radioGroup?: string;
    referrerPolicy?: HTMLAttributeReferrerPolicy;
    rel?: string;
    relative?: RelativeRoutingType;
    reloadDocument?: boolean;
    replace?: boolean;
    resource?: string;
    results?: number;
    rev?: string;
    role?: AriaRole;
    security?: string;
    slot?: string;
    spellCheck?: Booleanish;
    state?: any;
    style?: CSSProperties;
    suppressContentEditableWarning?: boolean;
    suppressHydrationWarning?: boolean;
    tabIndex?: number;
    target?: HTMLAttributeAnchorTarget;
    title?: string;
    to: To;
    translate?: "yes" | "no";
    type?: string;
    typeof?: string;
    unselectable?: "on" | "off";
    viewTransition?: boolean;
    vocab?: string;
}

层级结构

  • Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href">
    • LinkProps

属性

about? accessKey? aria-activedescendant? aria-atomic? aria-autocomplete? aria-braillelabel? aria-brailleroledescription? aria-busy? aria-checked? aria-colcount? aria-colindex? aria-colindextext? aria-colspan? aria-controls? aria-current? aria-describedby? aria-description? aria-details? aria-disabled? aria-dropeffect? aria-errormessage? aria-expanded? aria-flowto? aria-grabbed? aria-haspopup? aria-hidden? aria-invalid? aria-keyshortcuts? aria-label? aria-labelledby? aria-level? aria-live? aria-modal? aria-multiline? aria-multiselectable? aria-orientation? aria-owns? aria-placeholder? aria-posinset? aria-pressed? aria-readonly? aria-relevant? aria-required? aria-roledescription? aria-rowcount? aria-rowindex? aria-rowindextext? aria-rowspan? aria-selected? aria-setsize? aria-sort? aria-valuemax? aria-valuemin? aria-valuenow? aria-valuetext? autoCapitalize? autoCorrect? autoFocus? autoSave? children? className? color? content? contentEditable? contextMenu? dangerouslySetInnerHTML? datatype? defaultChecked? defaultValue? dir? discover? download? draggable? hidden? hrefLang? id? inlist? inputMode? is? itemID? itemProp? itemRef? itemScope? itemType? lang? media? nonce? onAbort? onAbortCapture? onAnimationEnd? onAnimationEndCapture? onAnimationIteration? onAnimationIterationCapture? onAnimationStart? onAnimationStartCapture? onAuxClick? onAuxClickCapture? onBeforeInput? onBeforeInputCapture? onBlur? onBlurCapture? onCanPlay? onCanPlayCapture? onCanPlayThrough? onCanPlayThroughCapture? onChange? onChangeCapture? onClick? onClickCapture? onCompositionEnd? onCompositionEndCapture? onCompositionStart? onCompositionStartCapture? onCompositionUpdate? onCompositionUpdateCapture? onContextMenu? onContextMenuCapture? onCopy? onCopyCapture? onCut? onCutCapture? onDoubleClick? onDoubleClickCapture? onDrag? onDragCapture? onDragEnd? onDragEndCapture? onDragEnter? onDragEnterCapture? onDragExit? onDragExitCapture? onDragLeave? onDragLeaveCapture? onDragOver? onDragOverCapture? onDragStart? onDragStartCapture? onDrop? onDropCapture? onDurationChange? onDurationChangeCapture? onEmptied? onEmptiedCapture? onEncrypted? onEncryptedCapture? onEnded? onEndedCapture? onError? onErrorCapture? onFocus? onFocusCapture? onGotPointerCapture? onGotPointerCaptureCapture? onInput? onInputCapture? onInvalid? onInvalidCapture? onKeyDown? onKeyDownCapture? onKeyPress? onKeyPressCapture? onKeyUp? onKeyUpCapture? onLoad? onLoadCapture? onLoadedData? onLoadedDataCapture? onLoadedMetadata? onLoadedMetadataCapture? onLoadStart? onLoadStartCapture? onLostPointerCapture? onLostPointerCaptureCapture? onMouseDown? onMouseDownCapture? onMouseEnter? onMouseLeave? onMouseMove? onMouseMoveCapture? onMouseOut? onMouseOutCapture? onMouseOver? onMouseOverCapture? onMouseUp? onMouseUpCapture? onPaste? onPasteCapture? onPause? onPauseCapture? onPlay? onPlayCapture? onPlaying? onPlayingCapture? onPointerCancel? onPointerCancelCapture? onPointerDown? onPointerDownCapture? onPointerEnter? onPointerEnterCapture? onPointerLeave? onPointerLeaveCapture? onPointerMove? onPointerMoveCapture? onPointerOut? onPointerOutCapture? onPointerOver? onPointerOverCapture? onPointerUp? onPointerUpCapture? onProgress? onProgressCapture? onRateChange? onRateChangeCapture? onReset? onResetCapture? onResize? onResizeCapture? onScroll? onScrollCapture? onSeeked? onSeekedCapture? onSeeking? onSeekingCapture? onSelect? onSelectCapture? onStalled? onStalledCapture? onSubmit? onSubmitCapture? onSuspend? onSuspendCapture? onTimeUpdate? onTimeUpdateCapture? onTouchCancel? onTouchCancelCapture? onTouchEnd? onTouchEndCapture? onTouchMove? onTouchMoveCapture? onTouchStart? onTouchStartCapture? onTransitionEnd? onTransitionEndCapture? onVolumeChange? onVolumeChangeCapture? onWaiting? onWaitingCapture? onWheel? onWheelCapture? ping? placeholder? prefetch? prefix? preventScrollReset? property? radioGroup? referrerPolicy? rel? relative? reloadDocument? replace? resource? results? rev? role? security? slot? spellCheck? state? style? suppressContentEditableWarning? suppressHydrationWarning? tabIndex? target? title? to translate? type? typeof? unselectable? viewTransition? vocab?

属性

about?: string
accessKey?: string
aria-activedescendant?: string

标识当 DOM 焦点在复合小部件、文本框、组或应用程序上时,当前活动的元素。

aria-atomic?: Booleanish

指示辅助技术是否将呈现整个更改区域,还是仅呈现部分更改区域,这取决于 aria-relevant 属性定义的更改通知。

aria-autocomplete?:
    | "none"
    | "list"
    | "inline"
    | "both"

指示输入文本是否可能触发显示用户对输入的预期值的一个或多个预测,并指定如果进行预测,将如何呈现预测。

aria-braillelabel?: string

定义一个字符串值,用于标记当前元素,旨在转换为盲文。

aria-label。

aria-brailleroledescription?: string

定义一个人类可读的、作者本地化的元素角色缩写描述,旨在转换为盲文。

aria-roledescription。

aria-busy?: Booleanish
aria-checked?:
    | boolean
    | "true"
    | "false"
    | "mixed"

指示复选框、单选按钮和其他小部件的当前“选中”状态。

  • aria-pressed
  • aria-selected。
aria-colcount?: number

定义表格、网格或树形网格中的总列数。

aria-colindex。

aria-colindex?: number

定义元素在表格、网格或树形网格中相对于总列数的列索引或位置。

  • aria-colcount
  • aria-colspan。
aria-colindextext?: string

定义 aria-colindex 的人类可读文本替代方案。

aria-rowindextext。

aria-colspan?: number

定义单元格或网格单元格在表格、网格或树形网格中跨越的列数。

  • aria-colindex
  • aria-rowspan。
aria-controls?: string

标识当前元素控制其内容或存在的元素(或多个元素)。

aria-owns。

aria-current?:
    | boolean
    | "time"
    | "true"
    | "location"
    | "page"
    | "step"
    | "false"
    | "date"

指示元素在容器或一组相关元素中表示当前项。

aria-describedby?: string

标识描述该对象的元素(或多个元素)。

aria-labelledby

aria-description?: string

定义一个字符串值,用于描述或注释当前元素。

相关的 aria-describedby。

aria-details?: string

标识为对象提供详细、扩展描述的元素。

aria-describedby。

aria-disabled?: Booleanish

指示元素是可感知的但已禁用,因此不可编辑或以其他方式可操作。

  • aria-hidden
  • aria-readonly。
aria-dropeffect?:
    | "link"
    | "copy"
    | "none"
    | "execute"
    | "move"
    | "popup"

指示当拖动对象在放置目标上释放时可以执行的功能。

在 ARIA 1.1 中

aria-errormessage?: string

标识为对象提供错误消息的元素。

  • aria-invalid
  • aria-describedby。
aria-expanded?: Booleanish

指示元素或它控制的另一个分组元素当前是展开还是折叠。

aria-flowto?: string

标识内容备用阅读顺序中的下一个元素(或多个元素),用户可以自行决定是否允许辅助技术覆盖按文档源顺序阅读的一般默认设置。

aria-grabbed?: Booleanish

指示元素在拖放操作中的“抓取”状态。

在 ARIA 1.1 中

aria-haspopup?:
    | boolean
    | "dialog"
    | "menu"
    | "true"
    | "false"
    | "grid"
    | "listbox"
    | "tree"

指示可通过元素触发的交互式弹出元素(如菜单或对话框)的可用性和类型。

aria-hidden?: Booleanish

指示元素是否向辅助功能 API 公开。

aria-disabled。

aria-invalid?:
    | boolean
    | "true"
    | "false"
    | "grammar"
    | "spelling"

指示输入的值不符合应用程序期望的格式。

aria-errormessage。

aria-keyshortcuts?: string

指示作者已实施的用于激活元素或将焦点赋予元素的键盘快捷键。

aria-label?: string

定义一个字符串值,用于标记当前元素。

aria-labelledby。

aria-labelledby?: string

标识标记当前元素的元素(或多个元素)。

aria-describedby。

aria-level?: number

定义元素在结构中的层级级别。

aria-live?: "off" | "assertive" | "polite"

指示元素将被更新,并描述用户代理、辅助技术和用户可以从实时区域期望的更新类型。

aria-modal?: Booleanish

指示元素在显示时是否为模态。

aria-multiline?: Booleanish

指示文本框是否接受多行输入或仅接受单行。

aria-multiselectable?: Booleanish

指示用户是否可以从当前可选择的后代中选择多个项目。

aria-orientation?: "horizontal" | "vertical"

指示元素的朝向是水平、垂直还是未知/不明确。

aria-owns?: string

标识元素(或多个元素)以便在 DOM 元素之间定义视觉、功能或上下文父/子关系,而 DOM 层次结构无法用于表示该关系。

aria-controls。

aria-placeholder?: string

定义一个简短的提示(一个单词或短语),旨在帮助用户在控件没有值时进行数据输入。提示可以是示例值或对预期格式的简要描述。

aria-posinset?: number

定义元素在当前列表项或树形项目集中的编号或位置。如果集合中的所有元素都存在于 DOM 中,则不是必需的。

aria-setsize。

aria-pressed?:
    | boolean
    | "true"
    | "false"
    | "mixed"

指示切换按钮的当前“按下”状态。

  • aria-checked
  • aria-selected。
aria-readonly?: Booleanish

指示元素不可编辑,但在其他方面可操作。

aria-disabled。

aria-relevant?:
    | "text"
    | "additions"
    | "additions removals"
    | "additions text"
    | "all"
    | "removals"
    | "removals additions"
    | "removals text"
    | "text additions"
    | "text removals"

指示当活动区域内的可访问性树被修改时,用户代理将触发哪些通知。

aria-atomic。

aria-required?: Booleanish

指示在提交表单之前,元素上是否需要用户输入。

aria-roledescription?: string

定义元素的角色的人类可读、作者本地化的描述。

aria-rowcount?: number

定义表格、网格或树形网格中的总行数。

aria-rowindex。

aria-rowindex?: number

定义元素在表格、网格或树形网格中相对于总行数的行索引或位置。

  • aria-rowcount
  • aria-rowspan。
aria-rowindextext?: string

定义 aria-rowindex 的人类可读的文本替代方案。

aria-colindextext。

aria-rowspan?: number

定义表格、网格或树形网格中单元格或网格单元格跨越的行数。

  • aria-rowindex
  • aria-colspan。
aria-selected?: Booleanish

指示各种小部件的当前“选中”状态。

  • aria-checked
  • aria-pressed。
aria-setsize?: number

定义当前列表项或树形项目集合中的项目数。如果集合中的所有元素都存在于 DOM 中,则不需要此属性。

aria-posinset。

aria-sort?:
    | "none"
    | "ascending"
    | "descending"
    | "other"

指示表格或网格中的项目是否按升序或降序排序。

aria-valuemax?: number

定义范围小部件允许的最大值。

aria-valuemin?: number

定义范围小部件允许的最小值。

aria-valuenow?: number

定义范围小部件的当前值。

aria-valuetext。

aria-valuetext?: string

定义范围小部件的 aria-valuenow 的人类可读的文本替代方案。

autoCapitalize?: string
autoCorrect?: string
autoFocus?: boolean
autoSave?: string
children?: ReactNode
className?: string
color?: string
content?: string
contentEditable?: Booleanish | "inherit"
contextMenu?: string
dangerouslySetInnerHTML?: {
    __html: string | TrustedHTML;
}
datatype?: string
defaultChecked?: boolean
defaultValue?: string | number | readonly string[]
dir?: string
discover?: DiscoverBehavior

定义链接发现行为

<Link /> // default ("render")
<Link discover="render" />
<Link discover="none" />
  • render - 默认,在链接呈现时发现路由
  • none - 不急于发现,仅在单击链接时发现
download?: any
draggable?: Booleanish
hidden?: boolean
hrefLang?: string
id?: string
inlist?: any
inputMode?:
    | "search"
    | "text"
    | "url"
    | "none"
    | "tel"
    | "email"
    | "numeric"
    | "decimal"

提示用户在编辑元素或其内容时可能输入的数据类型

is?: string

指定标准 HTML 元素应表现得像定义的自定义内置元素

itemID?: string
itemProp?: string
itemRef?: string
itemScope?: boolean
itemType?: string
lang?: string
media?: string
nonce?: string
onAbort?: ReactEventHandler<HTMLAnchorElement>
onAbortCapture?: ReactEventHandler<HTMLAnchorElement>
onAnimationEnd?: AnimationEventHandler<HTMLAnchorElement>
onAnimationEndCapture?: AnimationEventHandler<HTMLAnchorElement>
onAnimationIteration?: AnimationEventHandler<HTMLAnchorElement>
onAnimationIterationCapture?: AnimationEventHandler<HTMLAnchorElement>
onAnimationStart?: AnimationEventHandler<HTMLAnchorElement>
onAnimationStartCapture?: AnimationEventHandler<HTMLAnchorElement>
onAuxClick?: MouseEventHandler<HTMLAnchorElement>
onAuxClickCapture?: MouseEventHandler<HTMLAnchorElement>
onBeforeInput?: FormEventHandler<HTMLAnchorElement>
onBeforeInputCapture?: FormEventHandler<HTMLAnchorElement>
onBlur?: FocusEventHandler<HTMLAnchorElement>
onBlurCapture?: FocusEventHandler<HTMLAnchorElement>
onCanPlay?: ReactEventHandler<HTMLAnchorElement>
onCanPlayCapture?: ReactEventHandler<HTMLAnchorElement>
onCanPlayThrough?: ReactEventHandler<HTMLAnchorElement>
onCanPlayThroughCapture?: ReactEventHandler<HTMLAnchorElement>
onChange?: FormEventHandler<HTMLAnchorElement>
onChangeCapture?: FormEventHandler<HTMLAnchorElement>
onClick?: MouseEventHandler<HTMLAnchorElement>
onClickCapture?: MouseEventHandler<HTMLAnchorElement>
onCompositionEnd?: CompositionEventHandler<HTMLAnchorElement>
onCompositionEndCapture?: CompositionEventHandler<HTMLAnchorElement>
onCompositionStart?: CompositionEventHandler<HTMLAnchorElement>
onCompositionStartCapture?: CompositionEventHandler<HTMLAnchorElement>
onCompositionUpdate?: CompositionEventHandler<HTMLAnchorElement>
onCompositionUpdateCapture?: CompositionEventHandler<HTMLAnchorElement>
onContextMenu?: MouseEventHandler<HTMLAnchorElement>
onContextMenuCapture?: MouseEventHandler<HTMLAnchorElement>
onCopy?: ClipboardEventHandler<HTMLAnchorElement>
onCopyCapture?: ClipboardEventHandler<HTMLAnchorElement>
onCut?: ClipboardEventHandler<HTMLAnchorElement>
onCutCapture?: ClipboardEventHandler<HTMLAnchorElement>
onDoubleClick?: MouseEventHandler<HTMLAnchorElement>
onDoubleClickCapture?: MouseEventHandler<HTMLAnchorElement>
onDrag?: DragEventHandler<HTMLAnchorElement>
onDragCapture?: DragEventHandler<HTMLAnchorElement>
onDragEnd?: DragEventHandler<HTMLAnchorElement>
onDragEndCapture?: DragEventHandler<HTMLAnchorElement>
onDragEnter?: DragEventHandler<HTMLAnchorElement>
onDragEnterCapture?: DragEventHandler<HTMLAnchorElement>
onDragExit?: DragEventHandler<HTMLAnchorElement>
onDragExitCapture?: DragEventHandler<HTMLAnchorElement>
onDragLeave?: DragEventHandler<HTMLAnchorElement>
onDragLeaveCapture?: DragEventHandler<HTMLAnchorElement>
onDragOver?: DragEventHandler<HTMLAnchorElement>
onDragOverCapture?: DragEventHandler<HTMLAnchorElement>
onDragStart?: DragEventHandler<HTMLAnchorElement>
onDragStartCapture?: DragEventHandler<HTMLAnchorElement>
onDrop?: DragEventHandler<HTMLAnchorElement>
onDropCapture?: DragEventHandler<HTMLAnchorElement>
onDurationChange?: ReactEventHandler<HTMLAnchorElement>
onDurationChangeCapture?: ReactEventHandler<HTMLAnchorElement>
onEmptied?: ReactEventHandler<HTMLAnchorElement>
onEmptiedCapture?: ReactEventHandler<HTMLAnchorElement>
onEncrypted?: ReactEventHandler<HTMLAnchorElement>
onEncryptedCapture?: ReactEventHandler<HTMLAnchorElement>
onEnded?: ReactEventHandler<HTMLAnchorElement>
onEndedCapture?: ReactEventHandler<HTMLAnchorElement>
onError?: ReactEventHandler<HTMLAnchorElement>
onErrorCapture?: ReactEventHandler<HTMLAnchorElement>
onFocus?: FocusEventHandler<HTMLAnchorElement>
onFocusCapture?: FocusEventHandler<HTMLAnchorElement>
onGotPointerCapture?: PointerEventHandler<HTMLAnchorElement>
onGotPointerCaptureCapture?: PointerEventHandler<HTMLAnchorElement>
onInput?: FormEventHandler<HTMLAnchorElement>
onInputCapture?: FormEventHandler<HTMLAnchorElement>
onInvalid?: FormEventHandler<HTMLAnchorElement>
onInvalidCapture?: FormEventHandler<HTMLAnchorElement>
onKeyDown?: KeyboardEventHandler<HTMLAnchorElement>
onKeyDownCapture?: KeyboardEventHandler<HTMLAnchorElement>
onKeyPress?: KeyboardEventHandler<HTMLAnchorElement>
onKeyPressCapture?: KeyboardEventHandler<HTMLAnchorElement>
onKeyUp?: KeyboardEventHandler<HTMLAnchorElement>
onKeyUpCapture?: KeyboardEventHandler<HTMLAnchorElement>
onLoad?: ReactEventHandler<HTMLAnchorElement>
onLoadCapture?: ReactEventHandler<HTMLAnchorElement>
onLoadedData?: ReactEventHandler<HTMLAnchorElement>
onLoadedDataCapture?: ReactEventHandler<HTMLAnchorElement>
onLoadedMetadata?: ReactEventHandler<HTMLAnchorElement>
onLoadedMetadataCapture?: ReactEventHandler<HTMLAnchorElement>
onLoadStart?: ReactEventHandler<HTMLAnchorElement>
onLoadStartCapture?: ReactEventHandler<HTMLAnchorElement>
onLostPointerCapture?: PointerEventHandler<HTMLAnchorElement>
onLostPointerCaptureCapture?: PointerEventHandler<HTMLAnchorElement>
onMouseDown?: MouseEventHandler<HTMLAnchorElement>
onMouseDownCapture?: MouseEventHandler<HTMLAnchorElement>
onMouseEnter?: MouseEventHandler<HTMLAnchorElement>
onMouseLeave?: MouseEventHandler<HTMLAnchorElement>
onMouseMove?: MouseEventHandler<HTMLAnchorElement>
onMouseMoveCapture?: MouseEventHandler<HTMLAnchorElement>
onMouseOut?: MouseEventHandler<HTMLAnchorElement>
onMouseOutCapture?: MouseEventHandler<HTMLAnchorElement>
onMouseOver?: MouseEventHandler<HTMLAnchorElement>
onMouseOverCapture?: MouseEventHandler<HTMLAnchorElement>
onMouseUp?: MouseEventHandler<HTMLAnchorElement>
onMouseUpCapture?: MouseEventHandler<HTMLAnchorElement>
onPaste?: ClipboardEventHandler<HTMLAnchorElement>
onPasteCapture?: ClipboardEventHandler<HTMLAnchorElement>
onPause?: ReactEventHandler<HTMLAnchorElement>
onPauseCapture?: ReactEventHandler<HTMLAnchorElement>
onPlay?: ReactEventHandler<HTMLAnchorElement>
onPlayCapture?: ReactEventHandler<HTMLAnchorElement>
onPlaying?: ReactEventHandler<HTMLAnchorElement>
onPlayingCapture?: ReactEventHandler<HTMLAnchorElement>
onPointerCancel?: PointerEventHandler<HTMLAnchorElement>
onPointerCancelCapture?: PointerEventHandler<HTMLAnchorElement>
onPointerDown?: PointerEventHandler<HTMLAnchorElement>
onPointerDownCapture?: PointerEventHandler<HTMLAnchorElement>
onPointerEnter?: PointerEventHandler<HTMLAnchorElement>
onPointerEnterCapture?: PointerEventHandler<HTMLAnchorElement>
onPointerLeave?: PointerEventHandler<HTMLAnchorElement>
onPointerLeaveCapture?: PointerEventHandler<HTMLAnchorElement>
onPointerMove?: PointerEventHandler<HTMLAnchorElement>
onPointerMoveCapture?: PointerEventHandler<HTMLAnchorElement>
onPointerOut?: PointerEventHandler<HTMLAnchorElement>
onPointerOutCapture?: PointerEventHandler<HTMLAnchorElement>
onPointerOver?: PointerEventHandler<HTMLAnchorElement>
onPointerOverCapture?: PointerEventHandler<HTMLAnchorElement>
onPointerUp?: PointerEventHandler<HTMLAnchorElement>
onPointerUpCapture?: PointerEventHandler<HTMLAnchorElement>
onProgress?: ReactEventHandler<HTMLAnchorElement>
onProgressCapture?: ReactEventHandler<HTMLAnchorElement>
onRateChange?: ReactEventHandler<HTMLAnchorElement>
onRateChangeCapture?: ReactEventHandler<HTMLAnchorElement>
onReset?: FormEventHandler<HTMLAnchorElement>
onResetCapture?: FormEventHandler<HTMLAnchorElement>
onResize?: ReactEventHandler<HTMLAnchorElement>
onResizeCapture?: ReactEventHandler<HTMLAnchorElement>
onScroll?: UIEventHandler<HTMLAnchorElement>
onScrollCapture?: UIEventHandler<HTMLAnchorElement>
onSeeked?: ReactEventHandler<HTMLAnchorElement>
onSeekedCapture?: ReactEventHandler<HTMLAnchorElement>
onSeeking?: ReactEventHandler<HTMLAnchorElement>
onSeekingCapture?: ReactEventHandler<HTMLAnchorElement>
onSelect?: ReactEventHandler<HTMLAnchorElement>
onSelectCapture?: ReactEventHandler<HTMLAnchorElement>
onStalled?: ReactEventHandler<HTMLAnchorElement>
onStalledCapture?: ReactEventHandler<HTMLAnchorElement>
onSubmit?: FormEventHandler<HTMLAnchorElement>
onSubmitCapture?: FormEventHandler<HTMLAnchorElement>
onSuspend?: ReactEventHandler<HTMLAnchorElement>
onSuspendCapture?: ReactEventHandler<HTMLAnchorElement>
onTimeUpdate?: ReactEventHandler<HTMLAnchorElement>
onTimeUpdateCapture?: ReactEventHandler<HTMLAnchorElement>
onTouchCancel?: TouchEventHandler<HTMLAnchorElement>
onTouchCancelCapture?: TouchEventHandler<HTMLAnchorElement>
onTouchEnd?: TouchEventHandler<HTMLAnchorElement>
onTouchEndCapture?: TouchEventHandler<HTMLAnchorElement>
onTouchMove?: TouchEventHandler<HTMLAnchorElement>
onTouchMoveCapture?: TouchEventHandler<HTMLAnchorElement>
onTouchStart?: TouchEventHandler<HTMLAnchorElement>
onTouchStartCapture?: TouchEventHandler<HTMLAnchorElement>
onTransitionEnd?: TransitionEventHandler<HTMLAnchorElement>
onTransitionEndCapture?: TransitionEventHandler<HTMLAnchorElement>
onVolumeChange?: ReactEventHandler<HTMLAnchorElement>
onVolumeChangeCapture?: ReactEventHandler<HTMLAnchorElement>
onWaiting?: ReactEventHandler<HTMLAnchorElement>
onWaitingCapture?: ReactEventHandler<HTMLAnchorElement>
onWheel?: WheelEventHandler<HTMLAnchorElement>
onWheelCapture?: WheelEventHandler<HTMLAnchorElement>
ping?: string
placeholder?: string
prefetch?: PrefetchBehavior

定义链接的数据和模块预加载行为。

<Link /> // default
<Link prefetch="none" />
<Link prefetch="intent" />
<Link prefetch="render" />
<Link prefetch="viewport" />
  • none - 默认值,不预加载
  • intent - 当用户悬停或聚焦链接时预加载
  • render - 当链接渲染时预加载
  • viewport - 当链接在视口中时预加载,对于移动设备非常有用

预加载通过 HTML <link rel="prefetch"> 标签完成。它们被插入在链接之后。

<a href="..." />
<a href="..." />
<link rel="prefetch" /> // might conditionally render

因此,如果您使用 nav :last-child,您需要使用 nav :last-of-type,以避免样式有条件地从最后一个链接(和任何其他类似的 CSS 选择器)上脱落。

prefix?: string
preventScrollReset?: boolean

当链接被点击且应用正在使用 ScrollRestoration 时,阻止滚动位置重置到窗口顶部。这仅阻止新位置将滚动位置重置到顶部,后退/前进按钮导航将恢复滚动位置。

<Link to="?tab=one" preventScrollReset />
property?: string
radioGroup?: string
referrerPolicy?: HTMLAttributeReferrerPolicy
rel?: string

定义链接的相对路径行为。

<Link to=".." /> // default: "route"
<Link relative="route" />
<Link relative="path" />

考虑一个路由层级结构,其中父路由模式为 "blog",子路由模式为 "blog/:slug/edit"。

  • route - 默认值,相对于路由模式解析链接。在上面的示例中,相对链接 ".." 将删除 :slug/edit 段,返回到 "/blog"。
  • path - 相对于路径,因此 .. 将仅删除一个 URL 段,直到 "/blog/:slug"。
reloadDocument?: boolean

当链接被点击时,将使用文档导航而不是客户端路由:浏览器将正常处理过渡(如同它是 <a href> 一样)。

<Link to="/logout" reloadDocument />
replace?: boolean

替换历史堆栈中的当前条目,而不是向其推送新条目。

<Link replace />
# with a history stack like this
A -> B

# normal link click pushes a new entry
A -> B -> C

# but with `replace`, B is replaced by C
A -> C
resource?: string
results?: number
rev?: string
role?: AriaRole
security?: string
slot?: string
spellCheck?: Booleanish
state?: any

向下一个位置添加持久的客户端路由状态。

<Link to="/somewhere/else" state={{ some: "value" }} />

位置状态可以从 location 访问。

function SomeComp() {
const location = useLocation()
location.state; // { some: "value" }
}

此状态在服务器上不可访问,因为它是在 history.state 之上实现的

style?: CSSProperties
suppressContentEditableWarning?: boolean
suppressHydrationWarning?: boolean
tabIndex?: number
target?: HTMLAttributeAnchorTarget
title?: string
to: To

可以是一个字符串或一个部分 Path

<Link to="/some/path" />

<Link
to={{
pathname: "/some/path",
search: "?query=string",
hash: "#hash",
}}
/>
translate?: "yes" | "no"
type?: string
typeof?: string
unselectable?: "on" | "off"
viewTransition?: boolean

为此导航启用一个 View Transition


  Click me

要为过渡应用特定样式,请参阅 useViewTransitionState

vocab?: string