Skip to main content
Version: Next

@editora/icons

Framework-neutral icon package for Editora ecosystem surfaces.

Installation

npm i @editora/icons

Quick Start

import { renderIconSvg } from "@editora/icons";

const svg = renderIconSvg("check", { variant: "outline", size: 16, color: "currentColor" });

Usage

Use registry APIs to query/extend icons and render APIs to generate SVG/data URIs for UI surfaces.

Examples

  • Resolve icon metadata and aliases
  • Register app-specific icon sets
  • Render SVG strings for framework-agnostic UI

API Reference

SurfaceTypeNotes
iconDefinitions, iconNameListData exportsFull icon catalog metadata
getIcon, hasIcon, listIcons, listIconAliases, resolveIconRegistry functionsRead/query icon metadata and aliases
registerIcon, registerIconsRegistry functionsRegister single or bulk custom icons
renderIconSvg, iconToDataUriRendering functionsProduce SVG strings and data URIs
registerWithEditoraUI(registerFn)Integration helperBridges icon catalog into @editora/ui-core registries
IconDefinition, IconGlyph, IconRenderOptions, IconVariant, ResolvedIconType exportsAuthoring and rendering type contracts

Best Practices

  • Prefer currentColor for theme-aware icons.
  • Keep custom icon names stable to avoid breaking consumers.
  • Register custom icons at app startup, not per render.

Accessibility

Icon-only actions must always include an accessible text label via surrounding control attributes.

Performance Notes

Use named imports and avoid dynamic registry mutation during high-frequency UI updates.