Skip to content

Constraint Select width for long item #438

Closed Answered by vladmoroz
thewebartisan7 asked this question in Q&A
Discussion options

You must be logged in to vote

a. Use layout components:

<Box width="150px">
  <Select.Root>...</Select.Root>
</Box>

b. Use inline styles

<Select.Root>
  <Select.Trigger style={{ width: 150 }} />
  ...
</Select.Root>

I wouldn't recommend to target the internal CSS classes because the implementation may change in future versions. See these guides on Layout and Styling for more detail.

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by vladmoroz
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants