Tooltip

用于纯图标控件的悬停和聚焦工具提示,可位于任意一侧,可选带箭头。

可用框架
  • Angular: 可用
  • Vue: 可用
  • React: 可用
  • React Native: 可用

用法

导入

ts
import {
  SoneTooltipDirective,
} from "@surface-one/angular/tooltip";

API 参考

SoneTooltipDirective指令

Replaces the host's native `title` rather than sitting beside it — both at once would show two tooltips. The bubble is `aria-hidden`; the control keeps naming itself as it already did, or a screen reader would announce the name twice.

选择器
[soneTooltip]
输入
名称类型 默认值
soneTooltipstring""
soneTooltipSide

`null`: the side its container asks for (`SONE_TOOLTIP_SIDE`), else `bottom`.

TooltipSide | nullnull
soneTooltipAlignTooltipAlign"center"
soneTooltipArrowbooleantrue
soneTooltipDisabledbooleanfalse
soneTooltipShowDelay—SHOW_DELAY_MS