Sikt designsystem uses Phosphor Icons.
npm i -s @sikt/sds-icons
import { <IconName>Icon } from "@sikt/sds-icons";
import "@sikt/sds-icons/dist/index.css";
<<IconName>Icon />;
import { <IconName> } from "@phosphor-icons/react";
<<IconName> className="sds-icon" aria-hidden="true" />;
Import stylesheet:
@import url("@sikt/sds-icons");
Create custom markup:
<img
class="sds-icon"
aria-hidden="true"
src="@sikt/sds-icons/dist/assets/<icon-name>.svg"
/>
Or use sprite:
<svg class="sds-icon" aria-hidden="true">
<use href="@sikt/sds-icons/dist/sds-icons.svg#<icon-name>"></use>
</svg>
<img
class="sds-icon"
aria-hidden="true"
src="@phosphor-icons/core/assets/regular/<icon-name>.svg"
/>
Add new icons by adding name to src/icons.config.js
.