How do you change the width? #92
Answered
by
csandman
bubblydevs
asked this question in
Q&A
-
How do you change the width? I tried reading everywhere and i still have not found it. |
Beta Was this translation helpful? Give feedback.
Answered by
csandman
May 3, 2022
Replies: 1 comment 2 replies
-
Sure, there are two easy ways you could do this. The first is by setting a width on the <Select
chakraStyles={{
container: (provided) => ({
...provided,
width: "300px"
})
}}
/> The second would be to just add a container around the <Box w="250px">
<Select />
</Box> Here's a CodeSandbox example with both: https://codesandbox.io/s/chakra-react-select-custom-width-8h04ww?file=/example.js Let me know if either of these works for you! |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
bubblydevs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sure, there are two easy ways you could do this. The first is by setting a width on the
container
using thechakraStyles
prop:The second would be to just add a container around the
Select
with a manual width set on that.Here's a CodeSandbox example with both: https://codesandbox.io/s/chakra-react-select-custom-width-8h04ww?file=/example.js
Let me know if either of these works for you!