You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<TooltipProvider><TooltipTriggerasChild><spanclassName="inline-flex">Trigger</span></TooltipTrigger><TooltipContentasChild><div>
some content
</div></TooltipContent></TooltipProvider>
Codesandbox/StackBlitz link
No response
Logs
System Info
shadcn@canary, tailwind v4, react 19
Before submitting
I've made research efforts and searched the documentation
I've searched for existing issues
The text was updated successfully, but these errors were encountered:
I've researched this issue and would like to share my findings.
Hope this helps.
Most likely, the problem is caused by using asChild on the TooltipContent component.
The TooltipPrimitive.Arrow arrow will display even without adding asChild to the TooltipContent.
The reason why adding asChild to TooltipContent causes an error is likely because TooltipPrimitive.Content, which is wrapped by TooltipContent, has asChild set to false by default in radix-ui.
Describe the bug
Radix tooltip when content is used as child is expecting exactly one children, but in v4 an arrow was introduced to the content breaking it
ui/apps/v4/registry/new-york-v4/ui/tooltip.tsx
Lines 54 to 55 in 57d15bb
Affected component/components
Tooltip
How to reproduce
Codesandbox/StackBlitz link
No response
Logs
System Info
Before submitting
The text was updated successfully, but these errors were encountered: