Gathering detailed insights and metrics for @chakra-ui/select
Gathering detailed insights and metrics for @chakra-ui/select
Gathering detailed insights and metrics for @chakra-ui/select
Gathering detailed insights and metrics for @chakra-ui/select
chakra-react-select
A Chakra UI wrapper for the popular library React Select
@zag-js/select
Core logic for the select widget implemented as a state machine
@saas-ui/select
Select Component
@chakra-ui/c-checkbox
Chakra UI Vue | C checkbox component is used in forms when a user needs to select multiple values from several options component
Chakra UI is a component system for building SaaS products with speed ⚡️
npm install @chakra-ui/select
Typescript
Module System
Node Version
NPM Version
90
Supply Chain
92.3
Quality
75.1
Maintenance
100
Vulnerability
99.3
License
@chakra-ui/cli@3.22.0
Updated on Jul 07, 2025
@chakra-ui/panda-preset@3.22.0
Updated on Jul 07, 2025
@chakra-ui/react@3.22.0
Updated on Jul 07, 2025
@chakra-ui/charts@3.22.0
Updated on Jul 07, 2025
@chakra-ui/panda-preset@3.21.1
Updated on Jun 28, 2025
@chakra-ui/charts@3.21.1
Updated on Jun 28, 2025
TypeScript (82.2%)
MDX (16.96%)
JavaScript (0.71%)
CSS (0.07%)
HTML (0.06%)
Dockerfile (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
39,354 Stars
10,958 Commits
3,443 Forks
201 Watchers
10 Branches
695 Contributors
Updated on Jul 13, 2025
Latest Version
2.1.2
Package Id
@chakra-ui/select@2.1.2
Unpacked Size
55.52 kB
Size
9.47 kB
File Count
25
NPM Version
9.8.1
Node Version
18.18.2
Published on
Nov 09, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
2
The Select component is a component that allows users pick a value from predefined options.
Ideally, it should be used when there are more than 5 options, otherwise you might consider using a radio group instead.
1yarn add @chakra-ui/select 2 3# or 4 5npm i @chakra-ui/select
1import { Select } from "@chakra-ui/select"
1<Select placeholder="A simple select component"> 2 <option value="1">Option 1</option> 3 <option value="2">Option 2</option> 4 <option value="3">Option 3</option> 5</Select>
Pass the isDisabled
prop to put the select component in an invalid state
1<Select placeholder="Select option" isDisabled> 2 <option value="Option 1">Option 1</option> 3 <option value="Option 2">Option 2</option> 4 <option value="Option 3">Option 3</option> 5</Select>
Pass the isInvalid
prop to put the select component in an invalid state
1<Select placeholder="Select option" isInvalid> 2 <option value="Option 1">Option 1</option> 3 <option value="Option 2">Option 2</option> 4 <option value="Option 3">Option 3</option> 5</Select>
Control the visual appearance of the select component by passing the variant
prop.
The following values are allowed: outline, filled, flushed, unstyled
1<Stack> 2 <Select placeholder="Select option" variant="outline"> 3 <option value="Option 1">Option 1</option> 4 <option value="Option 2">Option 2</option> 5 <option value="Option 3">Option 3</option> 6 </Select> 7 8 <Select placeholder="Select option" variant="filled"> 9 <option value="Option 1">Option 1</option> 10 <option value="Option 2">Option 2</option> 11 <option value="Option 3">Option 3</option> 12 </Select> 13 14 <Select placeholder="Select option" variant="flushed"> 15 <option value="Option 1">Option 1</option> 16 <option value="Option 2">Option 2</option> 17 <option value="Option 3">Option 3</option> 18 </Select> 19 20 <Select placeholder="Select option" variant="unstyled"> 21 <option value="Option 1">Option 1</option> 22 <option value="Option 2">Option 2</option> 23 <option value="Option 3">Option 3</option> 24 </Select> 25</Stack>
Pass the size
prop to change the size and height of the select component.
The following values are allowed: sm, md, lg
1<Stack spacing={4}> 2 {["sm", "md", "lg"].map((size) => ( 3 <Select key={size} placeholder="Select option" size={size}> 4 <option value="Option 1">Option 1</option> 5 <option value="Option 2">Option 2</option> 6 <option value="Option 3">Option 3</option> 7 </Select> 8 ))} 9</Stack>
1const ControlledSelectExample = () => { 2 const [value, setValue] = React.useState("") 3 const handleChange = (event: React.ChangeEvent<HTMLSelectElement>) => { 4 setValue(event.target.value) 5 } 6 7 return ( 8 <Select 9 value={value} 10 onChange={handleChange} 11 placeholder="Controlled select" 12 > 13 <option value="Option 1">Option 1</option> 14 <option value="Option 2">Option 2</option> 15 <option value="Option 3">Option 3</option> 16 </Select> 17 ) 18}
Pass the icon
prop to change the arrow icon of the select component to a
custom icon.
You also have access to the iconSize
prop to change the size of the custom
arrow icon.
1const CustomSelectIconExample = () => { 2 const SelectIcon = () => ( 3 <Icon viewBox="0 0 24 24"> 4 <path 5 fill="currentColor" 6 d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z" 7 /> 8 </Icon> 9 ) 10 return <Select icon={SelectIcon} placeholder="Placeholder" size="md" /> 11}
Pass the focusBorderColor
prop to change the border color of the select
component in the focused state.
Pass the errorBorderColor
prop to change the border color of the select
component in the invalid state.
The value of these props can be set to a color in the theme object, or a raw CSS value.
1<Stack> 2 <Select focusBorderColor="lime" placeholder="Here is a sample placeholder" /> 3 4 <Select 5 isInvalid 6 errorBorderColor="crimson" 7 placeholder="Here is a sample placeholder" 8 /> 9</Stack>
Even though the select comes with predefined styles, you can override pretty much any property. Here's we'll override the background color.
1<Select 2 color="white" 3 borderColor="tomato" 4 backgroundColor="tomato" 5 placeholder="Woohoo! A new background color!" 6/>
No vulnerabilities found.
Reason
30 commit(s) and 15 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
7 existing vulnerabilities detected
Details
Reason
Found 5/25 approved changesets -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More