themesberg / themesberg/flowbite-react

Dropdown button tooltip

Open
#938 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

:rocket: enhancement
Dominant language
TypeScript
Stars
2.1k
Forks
506
PR merge metrics
No merged PRs in 30d

Description

  • I have searched the Issues to see if this bug has already been reported
  • I have tested the latest version

Summary

Now as far as I know, there are only 2 ways to setup a tooltip for a Dropdown component:
1.- Tooltip contained in the Dropdown label:

        <Dropdown
          size="sm"
          label={
            <Tooltip
              content="Tooltip text"
              placement="bottom">
              Dropdown button text
            </Tooltip>
          }>
        ...
        </Dropdown>

Issue: This not very nice as you have to move the pointer to the dropdown text to get the tooltip.
image

2.- Tooltip containing all the Dropdown:

        <Tooltip
          content="Tooltip text"
          placement="bottom">
            <Dropdown
              size="sm"
              label="Dropdown button text">
              ...
            </Dropdown>
        </Tooltip>

Issue: This is not very nice when the tooltip is in the bottom as it is shown even when the mouse is over the dropdown menu items, hidding part of them (and not always is feasible to change the tooltip placement due to design restrictions).
image

Suggested feature:

I would suggest to include a new dropdown property to easily allow to use a tooltip only for the dropdown button.
If you have any other workaround it would be nice to know it otherwise.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the existing Dropdown and Tooltip component APIs and their usage examples. Define how a new Dropdown property should apply the tooltip only to the button, including expected behavior while menu items are hovered; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, tailwindcss, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.