Shadcn Lazy Tooltip: a component wraps shadcn/ui tooltips and only mounts them when users actually hover or touch the trigger element.
Benefits:
โก Dramatically faster initial page loads when you have lots of tooltips
๐ Zero behavior changes after first interaction
๐ฆ Drop-in replacement for existing shadcn tooltips
๐ ๏ธ Full TypeScript support out of the box
๐ฑ Works perfectly on mobile with touch events
Perfect for data tables, dashboards, or any interface where you need multiple tooltips but don't want the performance hit on initial render.
The implementation is clean and the API stays exactly the same as regular shadcn tooltips.
๐ Blog Post
๐ GitHub Repo
Top comments (0)