Leave Yamada UI a star

Star
Yamada UIYamada UIv1.5.1

Tooltip

Tooltip is a component that displays short information, such as supplementary details for an element.

Source@yamada-ui/tooltip

Props

TooltipProps

as

Type

"symbol" | "object" | "clipPath" | "filter" | "mask" | "marker" | "text" | "g" | "p" | "big" | "link" | "small" | "sub" | "sup" | "style" | "animate" | "div" | "a" | "abbr" | "address" | ... 148 more ... | "textPath"

closeDelay

Description

The delay before hiding the tooltip.

Type

number

Default

0

closeOnClick

Description

If true, the tooltip will hide on click.

Type

boolean

Default

false

closeOnEsc

Description

If true, the tooltip will hide on pressing Esc key.

Type

boolean

Default

true

closeOnMouseDown

Description

If true, the tooltip will hide while the mouse is down.

Type

boolean

Default

false

closeOnPointerDown

Description

If true, the tooltip will hide while the pointer is down.

Type

boolean

Default

false

closeOnScroll

Description

If true, the tooltip will hide on scroll.

Type

boolean

Default

false

defaultIsOpen

Description

If true, the tooltip will be initially shown.

Type

boolean

duration

Description

The animation duration.

Type

number | Partial<Record<"exit" | "enter", number>>

gutter

Description

The distance or margin between the reference and popper. It is used internally to create an offset modifier.

Type

UIValue<number>

Default

8

isDisabled

Description

If true, the tooltip will be disabled.

Type

boolean

Default

false

isOpen

Description

If true, the tooltip will be shown.

Type

boolean

label

Description

The label of the tooltip.

Type

type ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

modifiers

Description

Array of popper.js modifiers. Check the docs to see the list of possible modifiers you can pass.

Type

Partial<Modifier<string, any>>[]

Docs

https://popper.js.org/docs/v2/modifiers/

offset

Description

The main and cross-axis offset to displace popper element from its reference element.

Type

[number, number]

onClose

Description

Callback to run when the tooltip hides.

Type

() => void

onOpen

Description

Callback to run when the tooltip shows.

Type

() => void

openDelay

Description

The delay before showing the tooltip.

Type

number

Default

0

placement

Description

The placement of the popper relative to its reference.

Type

UIValue<Placement>

Default

'bottom'

portalProps

Description

Props for portal component.

Type

Pick<PortalProps, "appendToParentPortal" | "containerRef">

withPortal

Description

If true, the element will be transported to the end of document.body.

Type

boolean

Edit this page on GitHub

PreviousPopoverNextTour