Skip to content

How to adapt the dropdown content width to Dropdown Tigger? #1921

Answered by joaom00
vaibhavsingh97 asked this question in Help
Discussion options

You must be logged in to vote

Hi @vaibhavsingh97,

You can use --radix-popper-anchor-width to achieve this, but I think a dropdown isn't the best component here because I can see that you have a search inside the dropdown content and that will conflict with typeahead feature. So would I say a Popover is better here? because I can see too it has a chevron icon on the right and that would be the trigger but you want to position the content relative to the EnvironmentSelectorWrapper and Popover component exposes an Anchor part to achieve that.

The --radix-popper-anchor-width isn't documented as in Select as --radix-select-trigger-width, so I don't know if using the css variable is recommended. Perhaps they have a good rea…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by benoitgrelard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants