Dropdown Width (UDSelect)

I’ve been searching but can only find bits and pieces of information that don’t seem to work for me. Trying to create a Dashboard with a form that has several drop downs. When I use New-UDSelect, it creates a dropdown that is only as wide as whatever value is selected. In cases where the Label for the dropdown is long, this can cause the text to wrap which obscures the drop down value.

Is there a way to set the width of the dropdown created by New-UDSelect or to set a minimum width?

Not sure how posting code works in here but this is a sample dashboard I’m working with:

New-UDDashboard -Title “Form” -Content {

New-UDForm -Content {

    New-UDSelect -Label 'Dropdown That Does Some Stuff' -Option {

        New-UDSelectOption -Name 'Test 1' -Value 'Test1'

        New-UDSelectOption -Name 'Test 2' -Value 'Test2'

    } -Id 'Dropdown' 

} -OnSubmit {

    Show-UDToast -Message "Test" -Duration 500



Product: PowerShell Universal
Version: 1.4.6

For this my friend you would have to delve into the world of CSS and look at using this module:-
I did build two select components myself which you can find on the marketplace as well

I do provide all the CSS tweaking in a theme in the readme but this is for just UD not PU but will work in PU if you get me :thinking: anyways I hope this sort of answers your question?

I also wrote a blog here:-
Using CSS to Style | Powershell Blog
To help with the whole CSS thing