Buckets:
| import { TooltipV2 } from "./tooltip-v2" | |
| import { KeybindV2 } from "./keybind-v2" | |
| const docs = `### Overview | |
| Floating tooltip built on Kobalte's tooltip primitive with v2 styling. | |
| ### API | |
| - \`value\`: Content rendered inside the floating tooltip. | |
| - \`children\`: The trigger element that activates the tooltip on hover/focus. | |
| - \`placement\`: Kobalte placement string (e.g. "top", "bottom", "left", "right"). | |
| - \`inactive\`: When true, renders only the trigger without tooltip behavior. | |
| - \`forceOpen\`: Forces the tooltip to stay open. | |
| - Inherits Kobalte Tooltip root props. | |
| ` | |
| export default { | |
| title: "UI V2/Tooltip", | |
| id: "components-tooltip-v2", | |
| component: TooltipV2, | |
| tags: ["autodocs"], | |
| parameters: { | |
| frameHeight: "300px", | |
| frameBackground: "#fff", | |
| docs: { | |
| description: { | |
| component: docs, | |
| }, | |
| }, | |
| }, | |
| } | |
| export const Simple = { | |
| render: () => ( | |
| <div style={{ padding: "80px", display: "flex", "justify-content": "center" }}> | |
| <TooltipV2 value="Tooltip Text"> | |
| <span>Hover me</span> | |
| </TooltipV2> | |
| </div> | |
| ), | |
| } | |
| export const WithKeybind = { | |
| render: () => ( | |
| <div style={{ padding: "80px", display: "flex", "justify-content": "center" }}> | |
| <TooltipV2 | |
| value={ | |
| <> | |
| Tooltip Text | |
| <KeybindV2 keys={["⌘", "⌘"]} variant="neutral" /> | |
| </> | |
| } | |
| > | |
| <span>Hover me</span> | |
| </TooltipV2> | |
| </div> | |
| ), | |
| } | |
| export const Path = { | |
| render: () => ( | |
| <div style={{ padding: "80px", display: "flex", "justify-content": "center" }}> | |
| <TooltipV2 | |
| value={ | |
| <> | |
| Components <span style={{ color: "var(--text-text-faint)" }}>/</span> Tooltip | |
| </> | |
| } | |
| > | |
| <span>Hover me</span> | |
| </TooltipV2> | |
| </div> | |
| ), | |
| } | |
| export const TitleDescription = { | |
| render: () => ( | |
| <div style={{ padding: "80px", display: "flex", "justify-content": "center" }}> | |
| <TooltipV2 | |
| value={ | |
| <> | |
| <span>Title</span> | |
| <span style={{ color: "var(--text-text-faint)" }}>·</span> | |
| <span style={{ color: "var(--text-text-faint)" }}>Description</span> | |
| </> | |
| } | |
| > | |
| <span>Hover me</span> | |
| </TooltipV2> | |
| </div> | |
| ), | |
| } | |
Xet Storage Details
- Size:
- 2.28 kB
- Xet hash:
- 4fc034acc6ca9cc3ec07dd2db6ad47a3310b768fbc4619e44a94df8e1ab19d4b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.