
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
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 9 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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.