구성 요소
툴팁
마우스를 올리거나 포커스할 때 표시되는 짧은 도움말입니다.
사용법
기본
Shortcut: Cmd K
HTML
<bs:bsui-tooltip>
<bs:bsui-tooltip-trigger trigger_label="Hover me" trigger_variant="outline" />
<bs:bsui-tooltip-popup content="Shortcut: Cmd K" />
</bs:bsui-tooltip>열기 및 닫기 지연
타이밍이 다른 두 트리거입니다. 하나는 첫 호버 프레임에 표시되고, 다른 하나는 포인터가 떠난 뒤에도 잠시 유지됩니다.
Shows the hint on the first hover frame
Stays up as the pointer moves away
HTML
<bs:bsui-stack direction="row" gap="3" justify="center">
<bs:bsui-tooltip openDelay="0">
<bs:bsui-tooltip-trigger trigger_label="Instant" trigger_variant="secondary" />
<bs:bsui-tooltip-popup content="Shows the hint on the first hover frame" />
</bs:bsui-tooltip>
<bs:bsui-tooltip openDelay="600" closeDelay="400">
<bs:bsui-tooltip-trigger trigger_label="Patient" trigger_variant="secondary" />
<bs:bsui-tooltip-popup content="Stays up as the pointer moves away" />
</bs:bsui-tooltip>
</bs:bsui-stack>아이콘 힌트
필드 라벨 옆의 고스트 아이콘 트리거는 제품 툴팁이 가장 자주 배치되는 위치입니다.
Retention window
Logs older than the window are deleted nightly
HTML
<bs:bsui-stack direction="row" gap="2" align="center" justify="center">
<bs:bsui-text content="Retention window" variant="label" tag="span" />
<bs:bsui-tooltip openDelay="0">
<bs:bsui-tooltip-trigger trigger_label="?" trigger_variant="ghost" trigger_size="icon-sm" />
<bs:bsui-tooltip-popup content="Logs older than the window are deleted nightly" />
</bs:bsui-tooltip>
</bs:bsui-stack>구조
툴팁의 구성 블록은 아래와 같습니다. 각 블록은 별도의 블록이며 부모 블록 안에서만 렌더링됩니다.
bsui/tooltipbsui/tooltip-popupbsui/tooltip-trigger
속성
| 속성 | 유형 | 기본값 |
|---|---|---|
openDelay | number | 600 |
closeDelay | number | 0 |
bsui/tooltip-popup
| 속성 | 유형 | 기본값 |
|---|---|---|
content | richtext | — |
bsui/tooltip-trigger
| 속성 | 유형 | 기본값 |
|---|---|---|
trigger | text | — |
trigger_block | text | bsui/button |
trigger_label | richtext | — |
trigger_icon | icon | — |
trigger_iconPosition | left | |
trigger_href | text | — |
trigger_variant | default | |
trigger_size | default | |
trigger_disabled | toggle | false |