Autodesk / hig

Autodesk's unified design system
https://storybook.weave.autodesk.com
Apache License 2.0
181 stars 114 forks source link

Dropdown does not let you customize its width #927

Open varvaratou opened 6 years ago

varvaratou commented 6 years ago

Dropdown comes with a minimum width of 300 px. We are want to use this component for cases when the text options displayed do not require such width. Also multiple Dropdown components need to be stacked and it becomes visually clattered. For example:

screen shot 2018-05-17 at 12 26 01 pm

It would be nice if there was the option to customize the size of the Dropdown.

Varvara Toulkeridou varvara.toulkeridou@autodesk.com

loafofpiecrust commented 5 years ago

At the very least, I would expect the overall Dropdown element to have consistent width with its options: dropdown-width

I would propose starting by simply reducing the minimum width of the overall element to 240px to match the options rather than 300px. I'm in a similar situation of needing to use the Dropdown element in a container that's smaller than 300px. If this makes sense, I can make a PR for it.

nfiniteset commented 5 years ago

Hi @loafofpiecrust Thanks for reaching out. Dropdown 2.0.0 just came out and in it the Input part of the dropdown expands to fit the width of the container. I'd rather see the menu take the same approach than constrain the width of the Input again.

A PR would be welcome.