Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hackclub/icons
Hack Club’s iconset, a superset of spectrum-icons
https://github.com/hackclub/icons
hackclub icons
Last synced: 25 days ago
JSON representation
Hack Club’s iconset, a superset of spectrum-icons
- Host: GitHub
- URL: https://github.com/hackclub/icons
- Owner: hackclub
- License: bsd-3-clause
- Created: 2018-08-29T17:29:44.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-12-17T15:10:26.000Z (about 1 month ago)
- Last Synced: 2024-12-24T10:02:15.141Z (about 1 month ago)
- Topics: hackclub, icons
- Language: TypeScript
- Homepage: https://icons.hackclub.com
- Size: 1.33 MB
- Stars: 40
- Watchers: 8
- Forks: 15
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `@hackclub/icons`
Hack Club’s icons are a superset of [Spectrum](https://github.com/withspectrum/spectrum)’s incredible collection (also published as [`supercons`](https://supercons.vercel.app/)). Designed for use with our [Design System](https://github.com/hackclub/design-system).
[See them all](https://hackclub-icons.now.sh)
## Usage
### With React
```sh
npm i @hackclub/icons
``````js
import React from 'react'
import Icon from '@hackclub/icons'export default () => (
)
```### With the API
`https://icons.hackclub.com/api/icons/:color/:glyph`
- `:glyph` - A glyph from [icons.hackclub.com](https://icons.hackclub.com).
- `:color` - Any valid HTML color or [Hack Club Theme](https://theme.hackclub.com) color prefixed with `hackclub-`. Replace `#` with `0x` when using a hexadecimal color.All responses are SVGs with the MIME type `image/svg+xml`. You can optionally include the .svg file extension.
Examples:
```html
```### In Figma
Copy and paste the Hack Club Icon component from the Figma file: [figma.com/file/u8evOObGA4HCzUKlrVra1q/Hack-Club-Icon-Component](https://www.figma.com/file/u8evOObGA4HCzUKlrVra1q/Hack-Club-Icon-Component)
Choose the icon you'd like by modifying the `Glyph`.
## Development Setup
1. Clone & enter the repo.
```sh
$ git clone https://github.com/hackclub/icons.git
$ cd icons
```2. Install dependencies.
```sh
$ yarn
```3. Build library.
```sh
yarn run prepare
```4. Run docs locally.
```sh
yarn run dev
```## Adding an icon
If you’d like to add an icon, the Figma file is [Hack Club Icons](https://www.figma.com/file/H2wiriGOtV3txSx6fwVTwsPz/Hack-Club-icons?node-id=0%3A1&t=m5yDilUsUNQxrUUu-1). Try to design the icon only out of components of other icons, to keep consistency high, with those small square canvas sizes. When you’re done, clone your new icon, flatten all the layers into one shape for the simplest/smallest code/rendering, then export as an SVG with no background. Open the file, copy the ``, then in the Icon source file, add a new one (alphabetically), using a wrapping `` if you have several ``s. Make sure to remove the fill attribute from all paths, & ensure you’re formatting props correctly as JSX (replacing hyphens with camelCase).
After publishing, remember to update the package dependency on the docs site so it’s showing the latest iconset.