
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
react-lucide-icon-picker
Advanced tools
This is a React component that allows you to pick Lucide icons.
This is a React component that allows you to pick Lucide icons.
To install the React Lucide Icon Picker, you can use npm or yarn:
npm install react-lucide-icon-picker
To use the React Lucide Icon Picker, simply import it and use it in your React application:
import 'react-lucide-icon-picker/style.css'
import { ReactLucideIconPicker } from 'react-lucide-icon-picker'
function App() {
return (
<div>
<h1>Choose an Icon</h1>
<ReactLucideIconPicker />
</div>
)
}
You can import components separately from the React Lucide Icon Picker. When doing so, ensure that the components are wrapped inside the <ReactLucideIconPicker.Provider>
to function correctly.
import 'react-lucide-icon-picker/style.css'
import { ReactLucideIconPicker } from 'react-lucide-icon-picker'
import { IconComponent } from 'react-lucide-icon-picker/components'
const App = () => (
<ReactLucideIconPicker.Provider>
<ReactLucideIconPicker.Search />
<ReactLucideIconPicker.IconList />
</ReactLucideIconPicker.Provider>
)
You can pass the onChange
prop to either the ReactLucideIconPicker
or the ReactLucideIconPicker.IconList
component. This allows you to receive the key and SVG element of the selected icon.
import 'react-lucide-icon-picker/style.css'
import { ReactLucideIconPicker } from 'react-lucide-icon-picker'
const App = () => {
const handleIconChange = ({ key, icon }) => {
console.log('Selected Icon Key:', key)
console.log('Selected Icon SVG Element:', icon)
}
return (
<ReactLucideIconPicker onChange={handleIconChange}>
{/* Other components can go here */}
</ReactLucideIconPicker>
)
}
or
import 'react-lucide-icon-picker/style.css'
import { ReactLucideIconPicker } from 'react-lucide-icon-picker'
const App = () => {
const handleIconChange = ({ key, icon }) => {
console.log('Selected Icon Key:', key)
console.log('Selected Icon SVG Element:', icon)
}
return (
<ReactLucideIconPicker.Provider>
<ReactLucideIconPicker.IconList onChange={handleIconChange} />
</ReactLucideIconPicker.Provider>
)
}
We welcome contributions to the React Lucide Icon Picker project. Please see the CONTRIBUTING.md file for guidelines on how to contribute.
The React Lucide Icon Picker is open source and available under the MIT License.
FAQs
This is a React component that allows you to pick Lucide icons.
The npm package react-lucide-icon-picker receives a total of 11 weekly downloads. As such, react-lucide-icon-picker popularity was classified as not popular.
We found that react-lucide-icon-picker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.