Tooltip
Wrapper for the Bootstrap tooltip component.
Example Usage
import React from "react";
import {Tooltip} from "bs5-react-elements";
function ExampleUsage() {
return <Tooltip
title="Lorem ipsum dolor."
data-bs-toggle="tooltip"
>
Lorem ipsum
</Tooltip>
}
Important! If you choose to pass a user defined component to the as
prop,
it must support ref forwarding.
Demos
The demos below show this element in action. You can view the source code of each demo to see how they work.
Props
Name | Description | Type | Default Value | Since |
---|---|---|---|---|
as | The element type of the tooltip | elementType | 'span' | 0.1.0 |
onShown | Handler for the shown.bs.tooltip event | func | 0.1.0 | |
onShow | Handler for the show.bs.tooltip event | func | 0.1.0 | |
onHidden | Handler for the hidden.bs.tooltip event | func | 0.1.0 | |
onHide | Handler for the hide.bs.tooltip event | func | 0.1.0 | |
onInserted | Handler for the inserted.bs.tooltip event | func | 0.1.0 | |
component | React ref that will be assigned the component instance | React ref | 0.1.0 | |
config | Component configuration | object | 0.1.0 | |
children | Tooltip contents | node | 0.1.0 | |
renderTitle | Render tooltip content as a react component | func | 2.0.0 |