Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] TooltipWrapper component #1007

Closed
wants to merge 1 commit into from
Closed

[RFC] TooltipWrapper component #1007

wants to merge 1 commit into from

Conversation

tcbegley
Copy link
Collaborator

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.

@tcbegley
Copy link
Collaborator Author

tcbegley commented May 6, 2024

Closing as I don't think this is a significant improvement on the existing ways of doing things, and in general I think it's better to have only one recommended way of doing things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant