Guidance on using Chassis Icons — the companion icon library — and alternative icon sets with Chassis CSS.
Chassis CSS does not include an icon set by default. Chassis Icons is the companion icon library for Chassis-based projects: a builder that generates icon fonts, SVG sprites, and individual optimized SVG files from a set of SVG source glyphs, and the icon set of Chassis built with it. Prefer the SVG formats over the icon font for vector fidelity and accessibility.
Chassis Icons
Chassis Icons converts source SVG glyphs into distribution assets: an icon font (WOFF and WOFF2), an SVG sprite, individual optimized SVG files, and CSS and SCSS stylesheets. The icon set of Chassis is built this way in the chassis-ui/website-icons repository and published to npm as @chassis-ui/website-icons. Install the package from npm to access all formats:
npm install @chassis-ui/website-iconsThe icon font, the SVG sprite and the stylesheets are in node_modules/@chassis-ui/website-icons/dist/web/: copy them, or serve them through a bundler. The snippets on this page assume these files are in a public assets/icons/ directory, and the individual SVG files in assets/icons/svgs/.
To build an icon set from other SVG files, use the builder, published to npm as @chassis-ui/icons with the chassis-icons command.
Icon font
The icon font renders icons via a CSS ::before pseudo-element. Include chassis-icons.css and apply .cx-{icon-name} to an <i> or <span> element. Icon names follow a {name}-{style} convention where style is outline or solid.
<link rel="stylesheet" href="/assets/icons/chassis-icons.css">
<i class="cx-home-solid"></i>
<i class="cx-arrow-right-outline"></i>For icons that convey meaning rather than decoration, add aria-label to the element or provide accompanying visually-hidden text.
SVG sprite
The SVG sprite packages all icons as <symbol> elements in a single chassis-icons.svg file. Reference icons with <use> and control dimensions via width and height attributes.
<svg width="24" height="24">
<use href="/assets/icons/chassis-icons.svg#home-solid"></use>
</svg>The symbol ID matches the icon filename without its .svg extension. SVG sprites inherit the element's current CSS color as fill.
Individual SVG files
The package holds an optimized SVG file for each icon in its dist/svgs/ directory. Embed them as images when neither the icon font nor the sprite is practical.
<img src="/assets/icons/svgs/bell-outline.svg" alt="Notifications" width="24" height="24">Alternatives
These icon sets have been evaluated for use alongside Chassis CSS and all ship SVG formats.
More options
These icon sets have not been formally evaluated against Chassis CSS but all include SVG support.