Icons
This package retains the source of the library of HIG icons.
You can import individual icons to render on your app.
import { Assets24 } from "@hig/icons";
const MyComponent = () => (
<div className="my-class">
<Assets24 />
</div>
);
export default MyComponent
Read more about where and how to use icons on the website.
Getting started
Install the package
yarn add @hig/icons @hig/theme-context @hig/theme-data
Developing
Adding a New Icon
To add a new SVG icon to the library, add the svg
file to the src/icons
directory.
Then run the following command:
yarn build-icons
This will use SVGO to optimize the new icon, and update our release files. Remember to commit these changes.
Accessing SVG source files
SVG source files for all icons are available in the /svg
subdirectory of the @hig/icons
package (e.g. ./node_modules/@hig/icons/svg
).