Skip to content

[tooltip] Add closeOnClick prop#4140

Open
atomiks wants to merge 1 commit intomui:masterfrom
atomiks:codex/tooltip-trigger-close-on-click
Open

[tooltip] Add closeOnClick prop#4140
atomiks wants to merge 1 commit intomui:masterfrom
atomiks:codex/tooltip-trigger-close-on-click

Conversation

@atomiks
Copy link
Contributor

@atomiks atomiks commented Feb 19, 2026

Closes #4113

closeOnClick is true by default, but this is acceptable over false (e.g. preventCloseOnClick) if it's for consistency with other props, and closeOnClick is used elsewhere like Menu.Item

Demo: https://stackblitz.com/edit/7dzwxbku?file=src%2FApp.tsx

@atomiks atomiks added type: new feature Expand the scope of the product to solve a new problem. component: tooltip Changes related to the tooltip component. labels Feb 19, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 19, 2026

commit: e1900c0

@netlify
Copy link

netlify bot commented Feb 19, 2026

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit e1900c0
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6996c7abeabd8700087b5f93
😎 Deploy Preview https://deploy-preview-4140--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mui-bot
Copy link

mui-bot commented Feb 19, 2026

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react 🔺+177B(+0.04%) ▼-6B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@atomiks atomiks marked this pull request as ready for review February 20, 2026 04:01
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Feb 20, 2026
@colmtuite
Copy link
Contributor

I want to discuss this one more. I don't currently think it's useful for any design.

@atomiks
Copy link
Contributor Author

atomiks commented Feb 21, 2026

@colmtuite it's partially useful even for anchored toasts

It's somewhat of a micro-detail, but you don't want the tooltip to dismiss in the period between pointerdown and pointerup, so the toast appears immediately on click:

Screenshot 2026-02-21 at 6 23 54 pm

The Slider label use case is indeed questionable though — because it seems like Slider should have its own tooltip-like label part, instead of trying to reuse Tooltip (as Tooltip doesn't support touch, which is yet another config option)

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

Labels

component: tooltip Changes related to the tooltip component. PR: out-of-date The pull request has merge conflicts and can't be merged. type: new feature Expand the scope of the product to solve a new problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tooltip] Add a way to prevent closing a tooltip on click

3 participants