dash-bootstrap-components
dash-bootstrap-components copied to clipboard
[RFC] TooltipWrapper component
This PR implements an experimental TooltipWrapper component which attaches a tooltip to the components that it wraps rather than using IDs to match to elements in the DOM.
Example usage would be as follows.
import dash_bootstrap_components as dbc
from dash import Dash, html
app = Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])
app.layout = dbc.Container(
[
html.P("The button below has a tooltip"),
dbc.TooltipWrapper(dbc.Button("Hover over me!"), text="test tooltip"),
],
className="p-5",
)
app.run_server(debug=False)
I'm not really sure about this. It's kind of neat, but I'm not sure it really solves any major problems that the original implementation has, and I generally think it's preferable for there to not be multiple different ways of accomplishing the same thing.