@rdicons/core Coming soon

The small engine behind the website, the plugin and the apps. Use it to build your own icon tools.

Install

terminal
npm install @rdicons/core

Customize an icon

TypeScript
import { buildSvg, svgToJsx } from '@rdicons/core'

const icon = { set: 'lucide', name: 'house', width: 24, height: 24, body: '<path stroke="currentColor" d="..."/>' }

const svg = buildSvg(icon, { color: '#4f46e5', strokeWidth: 1.5, size: 32, padding: 2, background: '#eef2ff' })
const component = svgToJsx(svg, 'House')

What is inside

  • buildSvg(icon, options) returns a standalone SVG with your color, stroke, size, padding and background.
  • svgToJsx(svg, name) turns an SVG into a React component.
  • normalizeHex, hexToHsv, hsvToHex, isLight: color helpers.
  • @rdicons/core/browser: PNG export, file download, clipboard copy and safe cleaning of uploaded SVGs (needs a browser).

On npm: @rdicons/core. It ships ESM and CommonJS builds with TypeScript types.