npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

datocms-plugin-lucide-icon-selector

v0.1.1

Published

A plugin for DatoCMS that provides a searchable icon selector using Lucide Icons

Readme

DatoCMS Icon Selector Plugin

A custom field extension for DatoCMS that provides a searchable icon selector using Lucide Icons.

Features

  • 🎨 Visual Icon Selection: Browse and select from hundreds of Lucide icons with visual previews
  • 🔍 Search Functionality: Quickly find icons by typing their name
  • 💾 Simple Storage: Icons are stored as string values (icon names) that you can use with the Lucide React library
  • 🎯 Manual Assignment: Can be assigned to any string field in the DatoCMS schema editor
  • Modern UI: Clean, intuitive interface that adapts to DatoCMS light and dark mode
  • 🎛️ Per-field Icon Filtering: Restrict which icons are available per field via the field configuration screen

Installation

From the DatoCMS Marketplace

  1. Go to your DatoCMS project settings
  2. Navigate to Plugins
  3. Click Add plugin and select Lucide Icon Selector from the Marketplace

For development

npm install

Setting up a field

Assign the Lucide Icon Selector editor to any string field via the DatoCMS schema editor:

  1. Create a String field in your DatoCMS model
  2. In the field's Presentation settings, look for the Editor dropdown
  3. Select Lucide Icon Selector from the list of available editors
  4. Optionally click the gear icon ⚙ to configure which icons are pickable

Per-field Icon Filtering

When you manually assign the Lucide Icon Selector to a string field, you can configure exactly which icons are available for selection:

  1. In the field's Presentation settings, select Lucide Icon Selector as the editor
  2. Click the gear icon ⚙ next to the editor name
  3. The configuration screen opens showing all available Lucide icons
  4. Search for specific icons by name
  5. Toggle individual icons to whitelist them
  6. Use Select all filtered to bulk-select visible icons, or Clear all to reset the selection
  7. Save your changes

When icons are whitelisted, content editors can only pick from the configured set. If no icons are whitelisted, all Lucide icons are available.

To reset the whitelist back to "all icons", clear the configuration settings for that field.

Using the selected icon in your application

The plugin stores the icon name as a string. Use it with the Lucide React library:

import { Heart, Star, User } from "lucide-react";

// Get the icon name from DatoCMS
const iconName = record.icon; // e.g., "Heart"

// Use it in your component
const IconComponent = { Heart, Star, User }[iconName];
return <IconComponent size={24} />;

Or dynamically:

import * as LucideIcons from "lucide-react";

const iconName = record.icon;
const IconComponent = LucideIcons[iconName as keyof typeof LucideIcons];
return IconComponent ? <IconComponent size={24} /> : null;

How It Works

The plugin works by:

  1. Custom Editor: Replaces the default text input with a custom icon selector when manually assigned to a string field
  2. Icon Loading: Dynamically loads and displays all available Lucide icons
  3. Search & Filter: Provides real-time search to filter through hundreds of icons
  4. Per-field Configuration: The field-level configuration screen lets you whitelist specific icons per field
  5. Theme Adaptation: The plugin automatically adapts to DatoCMS light and dark mode via the built-in Canvas component and native CSS custom properties
  6. Value Storage: Stores the selected icon name as a string value in DatoCMS

Development

Prerequisites

  • Node.js 18+
  • npm or yarn

Setup

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

Project Structure

src/
  ├── entrypoints/
  │   ├── ConfigScreen.tsx                # Plugin configuration screen
  │   ├── FieldExtensionConfigScreen.tsx   # Per-field icon filtering config screen
  │   ├── IconSelectField.tsx             # Main icon selector field component
  │   └── styles.module.css               # Component styles
  ├── utils/
  │   ├── lucideIcons.ts                  # Lucide icon names utility
  │   └── render.tsx                      # React rendering utility
  └── main.tsx                            # Plugin entry point

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues, questions, or feature requests, please open an issue on the GitHub repository.