swarm-icons v3.3.312-beta
swarm-icons
Icon library module of the Swarm Design System
Documentation
https://meetup.github.io/swarm-icons/
Using swarm-icons in your project
Installation
yarn add swarm-iconsUsage
Optimized svg files
If you need individual svg files for your project, you will find them in dist/optimized.
SVG sprite
For an svg sprite, swarm-icons also generates an HTML include, dist/sprite/sprite.inc.
You can inject this include into the top of an HTML document (right after the opening body tag).
For more information about svg sprites, see this article from CSS Tricks.
React
If the svg sprite is included at the top of every HTML document in your React project, you can use the
Icon component in meetup-web-components to render the icon.
Modifying the icon library
Sketch file organization
Each platform (web, iOS, Android) has its own page in an icon sketch file. Each platform page contains normal and "small" icon variants. We use this information hierarchy to support different shapes based on platform or variant.
SVG conventions
- Icons should be filled with #000000 at 100% opacity
- Icons should be compound paths - these are easier to create in Adobe Illustrator
- The icon path should not contain a stroke
- If it's not an icon (e.g.: Meetup script logotype), send it directly to the engineer
Sketch file structure
<file.sketch>
|
| - Web (page)
| |- icon-name (artboard for default icon)
| |- icon-name--small (artboard for small variant)
| |- icon-name--[otherVariant] (artboard for other variant)
| - iOS (page)
| |- icon-name (artboard for default icon)
| |- icon-name--small (artboard for small variant)
| |- icon-name--[otherVariant] (artboard for other variant)
| - Android (page)
|- icon-name (artboard for default icon)
|- icon-name--small (artboard for small variant)
|- icon-name--[otherVariant] (artboard for other variant)Artboard naming conventions
- Use lower case letters and hyphens only
- For icon variants such as "small", use a double dash
- for example,
my-icon--small
Adding new icons
- Check out a new branch. For example,
new_fancy_icon. - Use Sketch or Adobe Illustrator templates in
design_resources/to design a new iconIconGrid.aicontains the icon gridIconExport.sketchcontains the basic setup for an icon sketch file
- Save the sketch file for your icon to
src/sketch/ - Commit any changes to files in
src/sketch - Run
yarn run buildto export icon distribution from sketch files checked intosrc/sketch - Commit the resulting changes
- Submit a pull request
- The PR will publish a
-betatag to npm if you need to test the icon in a consumer app
Changing an icon
- Check out a new branch. For example,
edit_camera_icon. - Use the sketch source file in
src/sketch/to make edits - Commit any changes to files in
src/sketch - Run
yarn run buildto export icon distributions from sketch files - Commit the resulting changes
- Submit a pull request
- The PR will publish a
-betatag to npm
Deleting an icon
- Remove the sketch file for the icon from
src/sketch - Remove all
dist/<dist>except fordist/js - Run the build (
yarn build).
Reviewing pull requests
Use this handy checklist to review pull requests:
- Was an icon deleted? If so, did we bump the minor version in
Makefile? - If the major version was updated in
Makefile, was thisREADMEupdated with release notes? - Do generated file names in
dist/match the name of the.sketchfile committed? - Does the icon name make sense out of context, or is it ambiguous?
- Do the generated distributions fit the criteria listed here?
Releases
This package uses semver versioning to tag releases, although the patch version
is determined exclusively by the Travis build number for pushes to master.
Major and minor versions are hard-coded into the Makefile.
Manual pushes to master and PR merges to master will be built by Travis, and
will kick off the yarn publish routine. The currently-published version of the
package is shown on the repo homepage on GitHub in a badge at the top of the
README.
Development
Setup
You must have the sketchtool cli installed to run build commands
Once you have the latest version of Sketch installed, run the following to set up sketchtool:
~/Applications/Sketch.app/Contents/Resources/sketchtool/install.shyarn commands
| task | description |
|---|---|
yarn run build | builds all icon distributions to dist/; builds docs to doc/build |
yarn run publish-docs | builds and publishes documentation to github pages |
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago