twenty/packages/twenty-docs/twenty-ui/input/select.mdx
Charles Bochet 2674589b44
Remove any recoil reference from project (#18250)
## Remove all Recoil references and replace with Jotai

### Summary

- Removed every occurrence of Recoil from the entire codebase, replacing
with Jotai equivalents where applicable
- Updated `README.md` tech stack: `Recoil` → `Jotai`
- Rewrote documentation code examples to use
`createAtomState`/`useAtomState` instead of `atom`/`useRecoilState`, and
removed `RecoilRoot` wrappers
- Cleaned up source code comment and Cursor rules that referenced Recoil
- Applied changes across all 13 locale translations (ar, cs, de, es, fr,
it, ja, ko, pt, ro, ru, tr, zh)
2026-02-26 10:28:40 +01:00

55 lines
1.5 KiB
Text

---
title: Select
image: /images/user-guide/what-is-twenty/20.png
---
<Frame>
<img src="/images/user-guide/what-is-twenty/20.png" alt="Header" />
</Frame>
Allows users to pick a value from a list of predefined options.
<Tabs>
<Tab title="Usage">
```jsx
import { IconTwentyStar } from 'twenty-ui/display';
import { Select } from '@/ui/input/components/Select';
export const MyComponent = () => {
return (
<Select
className
disabled={false}
label="Select an option"
options={[
{ value: 'option1', label: 'Option A', Icon: IconTwentyStar },
{ value: 'option2', label: 'Option B', Icon: IconTwentyStar },
]}
value="option1"
/>
);
};
```
</Tab>
<Tab title="Props">
| Props | Type | Description |
|-------|------|-------------|
| className | string | Optional CSS class for additional styling |
| disabled | boolean | When set to `true`, disables user interaction with the component |
| label | string | The label to describe the purpose of the `Select` component |
| onChange | function | The function called when the selected values change |
| options | array | Represents the options available for the `Selected` component. It's an array of objects where each object has a `value` (the unique identifier), `label` (the unique identifier), and an optional `Icon` |
| value | string | Represents the currently selected value. It should match one of the `value` properties in the `options` array |
</Tab>
</Tabs>