Icon Picker

A simple icon picker component that allows you to pick an icon from a list of lucide icons.

Usage

Import the IconPicker component and use it in your project.

Installation

pnpm dlx shadcn@latest add "https://icon-picker.alan-courtois.fr/r/icon-picker"

Example

Use the IconPicker component in your project.

Controlled

Selected icon: None

Default

Custom Trigger

Custom Icons List

Props

The IconPicker component has the following props:

PropTypeDefaultDescription
valueIconName-The controlled value of the selected icon.
defaultValueIconName-The default value of the selected icon.
onValueChange(value: IconName) => void-Callback invoked when an icon is selected.
openboolean-Controlled open state of the picker.
defaultOpenbooleanfalseDefault open state of the picker.
onOpenChange(open: boolean) => void-Callback invoked when the open state changes.
childrenReactNode-The trigger element to open the icon picker.
searchablebooleantrueWhether the icon picker is searchable.
searchPlaceholderstringSearch for an icon...The placeholder for the search input.
triggerPlaceholderstringSelect an iconThe text displayed on the default trigger button when no icon is selected.
iconsListIconListall lucide iconsThe list of icons to display in the picker.