Tooltip
import {Tooltip} from "@qui/react-vscode"
Examples
Showcase
Dark Modern
import type {ReactElement} from "react"import {Button,Tooltip,TooltipContent,TooltipTrigger,} from "@qui/react-vscode"export default function Showcase(): ReactElement {return (<Tooltip><TooltipTrigger><Button>Hover or Focus</Button></TooltipTrigger><TooltipContent>Tooltip Content</TooltipContent></Tooltip>)}
API
TooltipProps
| Name & Description | Option(s) | Default |
|---|---|---|
ReactNode | ||
The CSS transition-duration of the enter and exit animations. Supply as a
number to configure both transitions at once, or supply an object to configure
the enter and exit transitions independently. |
| 80 |
Ensure that the component remains anchored to its reference element following
screen resizes or position changes. |
| |
The default value when uncontrolled. |
| |
Whether to flip the component's placement to keep it in view. |
| true |
id attribute. If omitted,
a unique identifier will be automatically generated for accessibility. |
| |
The distance between the tooltip and its anchor element. |
| 5 |
The controlled state for the tooltip. Supplying this value will override
hover and focus events. |
| |
If true, the component will show when the anchor element is focused.
This property is ignored if open is supplied. |
| false |
If true, the component will show when the anchor element is hovered. This
property is ignored if open is supplied. |
| false |
Describes the placement of the component before FloatingUI has applied all the
modifiers that may have flipped or altered the component. The final placement
may differ from this input property. |
| 'top' |
CSS position attribute of the component. Can be "absolute" or "fixed". |
| 'absolute' |
| 1080 |
Type
| number| {enter: numberexit: number}
Default
80
Description
The CSS transition-duration of the enter and exit animations. Supply as a
number to configure both transitions at once, or supply an object to configure
the enter and exit transitions independently.
Type
boolean
Description
Ensure that the component remains anchored to its reference element following
screen resizes or position changes.
Type
boolean
Description
The default value when uncontrolled.
Type
boolean
Default
true
Description
Whether to flip the component's placement to keep it in view.
Type
string
Description
id attribute. If omitted,
a unique identifier will be automatically generated for accessibility.
Type
| number| {alignmentAxis?: numbercrossAxis?: numbermainAxis?: number}
Default
5
Description
The distance between the tooltip and its anchor element.
Type
boolean
Description
The controlled state for the tooltip. Supplying this value will override
hover and focus events.
Type
boolean
Default
false
Description
If true, the component will show when the anchor element is focused.
This property is ignored if open is supplied.
Type
boolean
Default
false
Description
If true, the component will show when the anchor element is hovered. This
property is ignored if open is supplied.
Type
| 'top-start'| 'top'| 'top-end'| 'bottom-start'| 'bottom'| 'bottom-end'| 'left-start'| 'left'| 'left-end'| 'right-start'| 'right'| 'right-end'
Default
'top'
Description
Describes the placement of the component before FloatingUI has applied all the
modifiers that may have flipped or altered the component. The final placement
may differ from this input property.
Type
| 'absolute'| 'fixed'
Default
'absolute'
Description
CSS position attribute of the component. Can be "absolute" or "fixed".