TransferWise icons

This is the TransferWise SVG icon set, as seen in this demo.
The SVG icon sprite and demo are built using create-svg-icon-sprite.
Usage
A helpful general guide for SVG icon sprites - CSSTricks
Installation
npm install --save @transferwise/icons
Usage from a module-based environment
Javascript
import { iconSprite } from '@transferwise/icons';
...
...
If you wish to optimise as much as possible and only bundle the icons you need,
you can use Webpack plugins to require the icons from the dist/icons
directory
and create your own sprite and serve it as you choose.
CSS
@import "~@transferwise/icons/dist/icons.min.css";
(or just import it from JS depending on your build system)
Usage from a non-module-based environment
JavaScript
- Add
node_modules/@transferwise/icons/dist/svg-icon-sprite.js
to your bundle. - Use
window.svgIconSprite
from your code to access the sprite string - Create components in your framework if you want to
CSS
@import "node_modules/@transferwise/icons/dist/icons.min.css";
Usage from server side
Just append the sprite code (manually or in case of Node, by requiring it as a module) to your template
and use like explained here.
We recommend using the provided stylesheet for the classes below.
Styles
The package comes with styles (icons.min.css
) for icon sizes you should use
in your components for consistency.
Class | Size |
---|
tw-icon-sm | 16px |
tw-icon-md (default) | 24px |
tw-icon-lg | 32px |
tw-icon-xl | 40px |
tw-icon-xxl | 48px |
Adding/removing/changing icons
- Add/remove/change 24x24 SVG icon(s) in the
icons
folder. - Change
package.json
version (if doing multiple of these, follow the first one that applies):
Removing an icon: major release, f.e. 1.2.3 => 2.0.0
Adding an icon: minor release, f.e. 1.2.3 => 1.3.0
Changing an icon: patch release, f.e. 1.2.3 => 1.2.4
- Add a
CHANGELOG.md
entry with the version and an explanation of changes - Submit your pull request from a feature branch and get code reviewed.
- If the pull request is approved and the CircleCI build passes, you will be able to merge with rebase.
- Code will automatically be released to GitHub and published to npm with the version specified in the changelog and package file.
- The demo will also automatically be built.
Contributing
- Develop
- For a single-run check of version match and linting errors, run
npm test
. - Bump version number in
package.json
according to semver and add an item that a release will be based on to CHANGELOG.md
. - Submit your pull request from a feature branch and get code reviewed.
- If the pull request is approved and the CircleCI build passes, you will be able to merge with rebase.
- Code will automatically be released to GitHub and published to npm with the version specified in the changelog and package file.
Other
For features and bugs, feel free to add issues or contribute.