Platformicons

9.3.0 · active · verified Sun Apr 19

Platformicons provides a comprehensive set of web platform and framework logos, designed and maintained by the team behind Sentry.io. This library offers icons as both a React component (`PlatformIcon`) and raw SVG files, catering to various project setups. The current stable version is 9.3.0, with a release cadence that includes regular updates for new features (like adding new framework icons) and bug fixes. Key differentiators include its dual support for modern ESM and CommonJS module systems, a flexible React component with props for sizing, formatting ('sm' for compact, 'lg' for detailed), border radius, and optional language badges. It also includes a `preloadIcons` utility to prevent render jank and exposes a `platforms` array for runtime access to supported keys. Icons follow a consistent `language-framework` naming convention with intelligent fallbacks. For non-React users, direct access to organized SVG files is provided. The package is actively maintained, receiving frequent updates to expand its icon set and address issues.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates installation, preloading icons, and rendering multiple PlatformIcon components with various props for customization.

import React from 'react';
import ReactDOM from 'react-dom/client';
import { PlatformIcon, preloadIcons } from 'platformicons';

// Preload all icons to avoid render jank on initial load
preloadIcons('sm');

function App() {
  return (
    <div style={{ fontFamily: 'sans-serif', padding: '20px' }}>
      <h1>Platform Icons Demo</h1>
      <p>Render a React icon with custom size and radius:</p>
      <PlatformIcon platform="javascript-react" size={48} radius={8} />
      <p>Render a Python Django icon with a language badge:</p>
      <PlatformIcon platform="python-django" size={40} withLanguageIcon={true} languageIconStyles={{ borderRadius: '2px' }} />
      <p>Render a Go Echo icon in 'lg' format:</p>
      <PlatformIcon platform="go-echo" size={60} format="lg" />
    </div>
  );
}

const root = ReactDOM.createRoot(document.getElementById('root') ?? document.createElement('div'));
root.render(<React.StrictMode><App /></React.StrictMode>);

view raw JSON →