iconify-json-nucleo-sharp
v0.2.2
Published
Nucleo sharp icons as an Iconify icon set
Maintainers
Readme
iconify-json-nucleo-sharp
Nucleo sharp icons as an Iconify icon set.
See the workspace README for the full picture.
🚀 Install
Set your NUCLEO_LICENSE_KEY, then install with your package manager.
export NUCLEO_LICENSE_KEY=your-license-key
npm install iconify-json-nucleo-sharpFor pnpm, Yarn, or Bun, use pnpm add, yarn add, or bun add instead. A postinstall renders the official Nucleo packages into icons.json. Every package needs Node.js 18 or newer.
[!IMPORTANT] Current versions of npm, pnpm, Yarn, and Bun all block a dependency's postinstall script by default, so
icons.jsonis not generated and importing the package fails. Use the table below to allow the postinstall script to run, or generateicons.jsonyourself with the codegen command.
| Package manager | Allow the postinstall script |
| --------------- | --------------------------------------------------------------------------------------------------------------------------- |
| npm 12+ | Run npm approve-scripts iconify-json-nucleo-sharp |
| pnpm 11+ | Add iconify-json-nucleo-sharp: true under allowBuilds in pnpm-workspace.yaml, or run pnpm approve-builds |
| Yarn 4.14+ | Add dependenciesMeta.iconify-json-nucleo-sharp.built: true to package.json |
| Bun | Add iconify-json-nucleo-sharp to trustedDependencies in package.json, or run bun pm trust iconify-json-nucleo-sharp |
To generate icons.json without the postinstall, run the codegen directly:
npx iconify-json-nucleo-codegen build --base node_modules/iconify-json-nucleo-sharp💻 Usage
Every package ships as both ESM and CommonJS with bundled TypeScript types, so no separate @types package is needed. Register a set once with any Iconify consumer.
// ESM
import { icons } from 'iconify-json-nucleo-sharp';
import { addCollection } from '@iconify/react';
addCollection(icons);// CommonJS
const { addCollection } = require('@iconify/react');
const icons = require('iconify-json-nucleo-sharp');
addCollection(icons);Then render icons by their prefix:name.
<Icon icon="nucleo-sharp:star" />With @iconify/tailwind the JSON is read straight from node_modules.
<span class="icon-[nucleo-sharp--star]"></span>Build tools that need the raw set can read it directly from the iconify-json-nucleo-sharp/icons.json subpath export.
🔐 License key
The official Nucleo packages read NUCLEO_LICENSE_KEY from the environment in their preinstall and validate it against nucleoapp.com before any data is installed. This layer adds no license logic of its own. It simply depends on those packages, so a missing or invalid key fails the install upstream.
# Locally
export NUCLEO_LICENSE_KEY=your-license-key
# CI or Vercel
# Expose NUCLEO_LICENSE_KEY as an environment variable to the install step.⚖️ License
The tooling and wrapper code in this repository is MIT licensed.
That license covers the code only. It grants no rights to Nucleo icons, which are a paid product owned by Nucleo and governed by the Nucleo license. This repository contains no Nucleo icon data and must not be used to redistribute Nucleo assets. Generating and using the icons requires your own valid Nucleo license.
