Files
twenty/packages/twenty-docs/twenty-ui/input/icon-picker.mdx
T
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

59 lines
1.5 KiB
Plaintext

---
title: Icon Picker
image: /images/user-guide/github/github-header.png
---
<Frame>
<img src="/images/user-guide/github/github-header.png" alt="Header" />
</Frame>
A dropdown-based icon picker that allows users to select an icon from a list.
<Tabs>
<Tab title="Usage">
```jsx
import React, { useState } from "react";
import { IconPicker } from "@/ui/input/components/IconPicker";
export const MyComponent = () => {
const [selectedIcon, setSelectedIcon] = useState("");
const handleIconChange = ({ iconKey, Icon }) => {
console.log("Selected Icon:", iconKey);
setSelectedIcon(iconKey);
};
return (
<IconPicker
disabled={false}
onChange={handleIconChange}
selectedIconKey={selectedIcon}
variant="primary"
/>
);
};
```
</Tab>
<Tab title="Props">
| Props | Type | Description |
|-------|------|-------------|
| disabled | boolean | Disables the icon picker if set to `true` |
| onChange | function | The callback function triggered when the user selects an icon. It receives an object with `iconKey` and `Icon` properties |
| selectedIconKey | string | The key of the initially selected icon |
| onClickOutside | function | Callback function triggered when the user clicks outside the dropdown |
| onClose | function | Callback function triggered when the dropdown is closed |
| onOpen | function | Callback function triggered when the dropdown is opened |
| variant | string | The visual style variant of the clickable icon. Options include: `primary`, `secondary`, and `tertiary` |
</Tab>
</Tabs>