Skip to content
Projets

À propos

A friendly, open source React iconset

Développement web et applicatif

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
-1
in 7 days
-1
in 15 days
-1
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

Supercons

A friendly set of open source React icons.

→ Preview & search the iconset

Massive credit to @superbryntendo for the original set of icons & aesthetic inspiration.

Predecessor projects: spectrum-icons, @hackclub/icons

Banner with fun styling of Supercons

Usage

bun i supercons
# npm i supercons
import React from 'react'
import Like from 'supercons/like'
import Cloud from 'supercons/cloud'

export default () => (
  <div style={{ color: 'magenta' }}>
    <Like size={128} />
    <Cloud size={32} />
  </div>
)

or if you want to import all icons at once (worse for bundle size):

import React from 'react'
import Icon from 'supercons'

export default () => (
  <div style={{ color: 'cyan' }}>
    <Icon glyph="like" size={128} />
    <Icon glyph="cloud" size={32} />
  </div>
)

Built with/supports TypeScript.

Props

Prop Type Default Details
glyph String, required like See docs
size Number or string 32 Sets width & height
as React component svg Must render svg tag

You can also pass any other props. Remember to make your icons accessible with aria-label or title, use aria-hidden if they’re purely decorative, etc.

Development setup

  1. Clone & enter the repo.
$ git clone https://github.com/lachlanjc/supercons.git
$ cd supercons
  1. Install dependencies.
$ bun
  1. After making changes to icons, build the library.
$ bun run build
$ bun run build:svg
  1. Run docs locally.
$ cd docs
$ bun run dev

To-do list

  • Drop PropTypes for TypeScript (thanks @anirudhb!)
  • Use Microbundle for build
  • Allow tree-shaking by programatically generating a component for each icon
  • Forward refs (with proper TypeScript support)
  • Add more icons

Explorer des projets similaires

Chargement…