Skip to content

Conversation

@michaldudak
Copy link
Member

@michaldudak michaldudak commented Oct 27, 2025

Implemented detached / multiple trigger support in Tooltip, similarly to #2336

It is now possible to define triggers outside of Tooltip.Root using the handle prop. Multiple triggers per dialog with a dynamic payload are also implemented.

Delay groups created by Tooltip.Provider now apply to triggers (so when using detached triggers make sure the Tooltip.Trigger components are inside the Provider).

⚠️ Breaking changes

delay and closeDelay were moved from Tooltip.Root to Tooltip.Trigger, as they can be different per trigger.

Playground: https://deploy-preview-3071--base-ui.netlify.app/experiments/tooltip/tooltips
Docs: https://deploy-preview-3071--base-ui.netlify.app/react/components/tooltip#detached-triggers

Closes #3032
Built on top of #3040

@michaldudak michaldudak added type: new feature Expand the scope of the product to solve a new problem. component: tooltip Changes related to the tooltip component. breaking change Introduces changes that are not backward compatible. labels Oct 27, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 27, 2025

vite-css-base-ui-example

pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/react@3071
pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/utils@3071

commit: 589eb9f

@mui-bot
Copy link

mui-bot commented Oct 27, 2025

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react 🔺+5.39KB(+1.40%) 🔺+1.65KB(+1.35%)

Details of bundle changes


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

@netlify
Copy link

netlify bot commented Oct 27, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 589eb9f
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69037e9ce45ccd0008cfa113
😎 Deploy Preview https://deploy-preview-3071--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.

@michaldudak michaldudak force-pushed the tooltip-detached-triggers branch 7 times, most recently from 8d26554 to 28956f3 Compare October 28, 2025 10:23
@michaldudak michaldudak marked this pull request as ready for review October 28, 2025 11:13
@atomiks
Copy link
Contributor

atomiks commented Oct 28, 2025

Super cool 🙌

Screenshot 2025-10-28 at 10 56 11 pm

Does it look better if there isn't any whitespace padding that clips the content? It seems like the content should have padding instead of the popup?


Also imo with the animation demo at the bottom, it'd be good to show varying widths. I remember it looked weird before (with the Popover one) if they were different, but it's more likely in the real world for the widths to vary quite a bit.

If the transition transform amount needs to be manually adjusted for it to look good, ideally the demo should show that. (At least until we figure out an automatic method, maybe sizing CSS variables for the animation is needed)


When using the keyboard, the content animations play, but not the other popup animations

@michaldudak michaldudak force-pushed the tooltip-detached-triggers branch 2 times, most recently from ba51271 to 6bc2278 Compare October 29, 2025 11:04
@michaldudak
Copy link
Member Author

You're right. I updated the animations demo styles.
The middle tooltip is now much shorter, and I think the content transition still looks good.
I also added data-instant to Viewport and Arrow so they don't transition unnecessarily.

},
"defaultTriggerId": {
"type": "string | null",
"description": "ID of the trigger that the dialog is associated with.\nThis is useful in conjunction with the `defaultOpen` prop to create an initially open dialog.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tooltip

Copy link
Contributor

@atomiks atomiks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't able to find any issues aside from some JSDoc tweaks - animation example looks perfect

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 30, 2025
@michaldudak michaldudak force-pushed the tooltip-detached-triggers branch from e07abbf to d799e0e Compare October 30, 2025 14:44
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 30, 2025
@michaldudak michaldudak merged commit 7542b9a into mui:master Oct 30, 2025
20 checks passed
@michaldudak michaldudak deleted the tooltip-detached-triggers branch October 30, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Introduces changes that are not backward compatible. component: tooltip Changes related to the tooltip component. 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] Support detached triggers

3 participants