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
I am trying to control the max height of the ComboboxOptions. I tried to just setting a maximum height tailwind class but its not working (<ComboboxOptions className="max-h-[200px]" >). I noticed the rendered element sets a style property on the element iself: max-height: min(var(--anchor-max-height, 100vh), 571px).
It looks like you're supposed to control the max-height through a css variable. This seems to work but its not documented on the Combobox react docs. Also it would be nice if you can control it through other means as well like an attribute.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Version: headlessui 2.0.3.
Component: Combobox
I am trying to control the max height of the ComboboxOptions. I tried to just setting a maximum height tailwind class but its not working (
<ComboboxOptions className="max-h-[200px]" >
). I noticed the rendered element sets a style property on the element iself:max-height: min(var(--anchor-max-height, 100vh), 571px)
.It looks like you're supposed to control the max-height through a css variable. This seems to work but its not documented on the Combobox react docs. Also it would be nice if you can control it through other means as well like an attribute.
Is there more info on this available?
Beta Was this translation helpful? Give feedback.
All reactions