API reference
components/tooltip
Import
Section titled “Import”import * as api from "@fungi.computer/caps/components/tooltip";Exports
Section titled “Exports”| 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”type TooltipSide = "bottom" | "left" | "right" | "top";Supported TooltipSide values.
TooltipPropstype alias
Section titled “TooltipProps”type TooltipProps = object & Omit<HTMLAttributes<HTMLSpanElement>, "children">;Props accepted by Tooltip.
Type Declaration
Section titled “Type Declaration”| 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”type TooltipTriggerProps = object & ButtonHTMLAttributes<HTMLButtonElement>;Props accepted by TooltipTrigger.
Type Declaration
Section titled “Type Declaration”| Name | Type |
|---|---|
asChild? |
boolean |
children? |
ReactNode |
TooltipContentPropstype alias
Section titled “TooltipContentProps”type TooltipContentProps = object & HTMLAttributes<HTMLDivElement>;Props accepted by TooltipContent.
Type Declaration
Section titled “Type Declaration”| Name | Type |
|---|---|
children |
ReactNode |
Tooltipconstant
Section titled “Tooltip”const Tooltip: ForwardRefExoticComponent< object & Omit<HTMLAttributes<HTMLSpanElement>, "children"> & RefAttributes<HTMLSpanElement>>;A tooltip controller with explicit controlled or uncontrolled open state.
TooltipTriggerconstant
Section titled “TooltipTrigger”const TooltipTrigger: ForwardRefExoticComponent< object & ButtonHTMLAttributes<HTMLButtonElement> & RefAttributes<HTMLButtonElement>>;The trigger control for a Tooltip.
TooltipContentconstant
Section titled “TooltipContent”const TooltipContent: ForwardRefExoticComponent< object & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;The positioned content region for a Tooltip.