Skip to content

opensite-ai/page-speed-icon

Repository files navigation

@page-speed/icon

Performance-optimized dynamic icon loader for the OpenSite AI site builder platform

PageSpeed Map React Component


npm version npm downloads License TypeScript Tree-Shakeable

Install

pnpm add @page-speed/icon

Usage

import { Icon } from "@page-speed/icon";

<Icon name="lucide/home" size={24} apiKey="your-icons-api-key" />;

Features

  • Dynamic icon fetch from icons.opensite.ai
  • prefix/name and prefix:name name formats
  • Inline SVG rendering with currentColor normalization
  • In-memory response caching with in-flight request de-duplication
  • Tree-shakable exports for core/types/utils

API

  • Icon (primary component)
  • DynamicIcon (compatibility alias)
  • buildIconRequestUrl(...)
  • parseIconName(...)
  • processSvgForCurrentColor(...)

About

Library of performance-optimized SVG icons for React, designed and engineered by the OpenSite UI/UX team.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors