Skip to content
API reference

components/tooltip

Import
import * as api from "@fungi.computer/caps/components/tooltip";
Kind Export Description
type alias TooltipSide Supported TooltipSide values.
type alias TooltipProps Props accepted by Tooltip.
type alias TooltipTriggerProps Props accepted by TooltipTrigger.
type alias TooltipContentProps Props accepted by TooltipContent.
constant Tooltip A tooltip controller with explicit controlled or uncontrolled open state.
constant TooltipTrigger The trigger control for a Tooltip.
constant TooltipContent The positioned content region for a Tooltip.

TooltipSidetype alias

Section titled “TooltipSide”
Signature
type TooltipSide = "bottom" | "left" | "right" | "top";

Supported TooltipSide values.


TooltipPropstype alias

Section titled “TooltipProps”
Signature
type TooltipProps = object & Omit<HTMLAttributes<HTMLSpanElement>, "children">;

Props accepted by Tooltip.

Name Type Description
children ReactNode -
defaultOpen? boolean -
delayDuration? number -
onOpenChange()? (open) => void Called after the tooltip open state changes.
open? boolean -
side? TooltipSide -

TooltipTriggerPropstype alias

Section titled “TooltipTriggerProps”
Signature
type TooltipTriggerProps = object & ButtonHTMLAttributes<HTMLButtonElement>;

Props accepted by TooltipTrigger.

Name Type
asChild? boolean
children? ReactNode

TooltipContentPropstype alias

Section titled “TooltipContentProps”
Signature
type TooltipContentProps = object & HTMLAttributes<HTMLDivElement>;

Props accepted by TooltipContent.

Name Type
children ReactNode

Tooltipconstant

Section titled “Tooltip”
Signature
const Tooltip: ForwardRefExoticComponent<
object &
Omit<HTMLAttributes<HTMLSpanElement>, "children"> &
RefAttributes<HTMLSpanElement>
>;

A tooltip controller with explicit controlled or uncontrolled open state.


TooltipTriggerconstant

Section titled “TooltipTrigger”
Signature
const TooltipTrigger: ForwardRefExoticComponent<
object &
ButtonHTMLAttributes<HTMLButtonElement> &
RefAttributes<HTMLButtonElement>
>;

The trigger control for a Tooltip.


TooltipContentconstant

Section titled “TooltipContent”
Signature
const TooltipContent: ForwardRefExoticComponent<
object & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>
>;

The positioned content region for a Tooltip.