themesberg / themesberg/flowbite

Tooltip component performance issues with multiple instances - lazy mounting suggestion

Open
#1,069 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
9.4k
Forks
862
PR merge metrics
No merged PRs in 30d

Description

Description

Describe the bug
The Flowbite Tooltip component causes significant performance issues when multiple instances are used on a page. Each tooltip mounts its content immediately on page load regardless of whether it's visible, causing unnecessary renders and slowing down the application.

To Reproduce

  1. Create a page with multiple Tooltip components (10+ instances)
  2. Monitor performance using browser dev tools
  3. Notice increased load time and reduced responsiveness
  4. Check React profiler to see all Tooltip contents being mounted simultaneously

Expected behavior
Tooltips should only mount their content when needed (on hover/focus), not on initial page load.

Proposed solution
Implement lazy loading for tooltip content:

  1. Only mount the tooltip content when the trigger element is hovered/focused
  2. Unmount content when tooltip is hidden
  3. Add a prop for preloading if immediate display is required

thanks <3

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 locating the Flowbite Tooltip component and reproducing the issue with 10 or more instances while inspecting browser developer tools and the React profiler. Done means tooltip content mounts on hover or focus rather than initial page load, is removed when hidden, and supports the proposed preloading option if immediate display is needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.