How to grow popover content width to match trigger #2894
-
I have a similar question to #1921 but my popover content is too small and doesn't grow to the size of the trigger? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Check here. https://www.radix-ui.com/primitives/docs/components/popover#constrain-the-content-size |
Beta Was this translation helpful? Give feedback.
-
I am facing the same issue, were you able to identify a solution? |
Beta Was this translation helpful? Give feedback.
-
If you are using Shadcn and Tailwind v4, you can do something like this: <PopoverContent className="p-0 w-[var(--radix-popover-trigger-width)]"> {...} </PopoverContent> |
Beta Was this translation helpful? Give feedback.
Check here. https://www.radix-ui.com/primitives/docs/components/popover#constrain-the-content-size