yarn add @twilio-paste/tooltip - or - yarn add @twilio-paste/core
import {Tooltip} from '@twilio-paste/core/tooltip';
const TooltipExample: React.FC = () => {
return (
<Tooltip baseId="tooltip-example" text="Tooltip text...">
<Button variant="primary">Open Tooltip</Button>
</Tooltip>
);
};
text RequiredRequired
The text content of the Tooltip.
- Type
string
element
Overrides the default element name to apply unique styles with the Customization Provider.
- Type
any
- Default
TOOLTIP
state
The returned state from the useTooltipState
hook.
- Type
TooltipStateReturn
Inherited props
Paste components will often extend native HTML elements and as a result will inherit or extend their available properties. Below is a list of the props this component has inherited and are also available to use.
Inherited props
Paste components will often extend native HTML elements and as a result will inherit or extend their available properties. Below is a list of the props this component has inherited and are also available to use.