Rocket.Chat's Icons
npm install @rocket.chat/icons@rocket.chat/icons> Rocket.Chat's Icons
---
  !npm downloads !License: MIT
Add @rocket.chat/icons as a dependency:
``sh
npm i @rocket.chat/icons
yarn add @rocket.chat/icons
`
Contributions, issues, and feature requests are welcome!
Feel free to check the issues.
All the icons should be designed by Rocket.Chat's design crew, following some conventions:
- The view box must have the dimensions of 32x32 units;
- Any horizontal assimetry must follow the left-to-right direction.
- The icon must be published on Figma.
As the icons might be arbitrarily scaled, the chosen source format for individual icon graphics is
SVG. As Figma can export graphics with some additional SVG attributes and elements, they must be
removed:
- The
The src/ directory holds all the SVG icons that would be processed. The filenames define the icon names, so they
should stick with a basic rule: an icon name must describe the icon shape, not its utility. For instance:
- [ ] message.svg (wrong)balloon.svg
- [x] (right)
If the icon must be mirrored for right-to-left read direction, it required to add a trailing .dir before the filebackspace.dir.svg
extension (e.g. ).
As this package dependends on others in this monorepo, before anything run the following at the root directory:
`sh`
yarn build
To ensure the source is matching our coding style, we perform linting>).
Before commiting, check if your code fits our style by running:
`sh`
yarn lint
Some linter warnings and errors can be automatically fixed:
`sh`
yarn lint-and-fix
To use the fuselage icons, you need to import the css first:
`css`
@import url('@rocket.chat/icons/dist/rocketchat.css');
Usage Example:
`html
{icon}
``