Foundations
Iconography
The WDS icon set (53 icons), shown with
Overview#
Full icon list available in the design system.
53 icons
Icons#
dashboard (10)#
other (8)#
outline (26)#
questions (9)#
Register icons#
<wds-icon> shows only registered icons. Register the WDS set once, before the first icon renders. Your own icons go through the same function and can be added at any time.
import { registerIcons } from '@wds/angular/icon';
import { icons } from '@wds/core/icons';
// Once, before the first icon renders.
registerIcons(icons);
// Your own icons: any name, trusted SVG only (it is rendered as HTML).
registerIcons({
'brand-logo': {
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M12 2 2 7l10 5 10-5-10-5Z"/></svg>',
},
});Add a new icon#
Icons of the WDS set live as SVG files in packages/core/src/components/icon/svg, one folder per category.
Add the SVG file#
packages/core/src/components/icon/svg/<category>/<name>.svg. Use a 24×24 viewBox and a single color: every fill and stroke color becomes currentColor, so the icon takes the text color. A new folder creates a new category.
svg/
├── dashboard/
├── other/
│ └── chevron-down.svg
└── outline/
└── trash.svgGenerate the set#
@wds/core/icons from the SVG files (it also runs in pnpm build). The name is <name>-<category>, e.g. outline/trash.svg → trash-outline; icons in other keep the file name. The same name twice stops the script with an error.
pnpm --filter @wds/core iconsBuild and check#
pnpm build