Components, Content
Icons
One set of inline SVG icons that take the color of the surrounding text.
This is the endue icon set. Every icon is inline SVG, and its color follows the surrounding text color through currentColor. The full markup is in icons.json, as a map from icon name to SVG string.
Specification
- Most icons use a 24×24 viewBox with a stroke width of 2 and round caps and joins. Some use a 20×20 viewBox with a stroke width of 1.5.
- A few icons are drawn as fills: Play, Stop, Grip, Explore, Channel and the operating system logos.
- The control sets the display size: 12 (badge), 14 (button
xsandsm, Callout), 16 (buttonmd, menu, input), 20 (buttonlg, top bar). - The color is the text color of the place where the icon sits. Secondary controls use
muted-foreground, icons next to body text useforeground, and brand and status icons useprimary-textand*-text.
Markup
Take the icon out of icons.json by name and inline it as it is. Change only width and height to the display size.
<span style="color: var(--muted-foreground)"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">…</svg></span>
Accessibility
- Give a decorative icon
aria-hidden="true". Give a standalone icon that carries meaning a name.
Don’t
- Don’t use emoji in place of an icon.
- Don’t mix in another icon set. Draw a missing icon to the same specification (24 viewBox, stroke 2, round).
- Don’t paint an icon with a raw fill color such as
primaryorsuccess. Use the text pair (*-text).