Tooltip
Tooltip is part of the Disclosure and overlays group. Short non-interactive helper text for an existing control.
Installation
Section titled “Installation”npx bambiui add tooltip --framework reactnpx bambiui add tooltip --framework solidnpx bambiui add tooltip --framework sveltenpx bambiui add tooltip --framework vueimport { Tooltip, TooltipTrigger, TooltipContent, TooltipArrow } from "@/components/ui/tooltip";
export function Example() { return <Tooltip />;}import { Tooltip, TooltipTrigger, TooltipContent, TooltipArrow } from "~/components/ui/tooltip";
export function Example() { return <Tooltip />;}<script lang="ts"> import { Tooltip, TooltipTrigger, TooltipContent, TooltipArrow } from "$lib/components/ui/tooltip";</script>
<Tooltip /><script setup lang="ts">import { Tooltip, TooltipTrigger, TooltipContent, TooltipArrow } from "@/components/ui/tooltip";</script>
<template> <Tooltip /></template>Preview
Section titled “Preview”
Tooltip preview should be verified in the target framework after copying the component source. Interactive behavior comes from generated public artifacts, not docs-only mock behavior.
Behavior
Section titled “Behavior”Use for small hints, not required instructions.
Generated output uses serializable data-* attributes for state and styling. Controlled components fire bambi:<event-name> events and expect application state to update externally; uncontrolled components manage local source state and still fire events.
Accessibility
Section titled “Accessibility”Use semantic labels, visible focus states, and keyboard interaction patterns appropriate for Tooltip. Do not hide required instructions in transient UI. Verify focus movement and disabled states in the installed framework output.
Exports
Section titled “Exports”Tooltip, TooltipTrigger, TooltipContent, TooltipArrowTokens
Section titled “Tokens”Customize tokens after installing and previewing the component. Relevant tokens include:
--bambi-background--bambi-foreground--bambi-border