Icons
The theme uses Material Symbols icons, registered on demand, with no icon font or CDN.
Icons
All icons in the theme are Material Symbols. @m3e/icons provides them as SVG paths, and <m3e-icon> displays them. Choosing icons covers styles, fill and size; Using icons covers registration and accessibility requirements.
Features
- Registered on demand: each icon is a separate module. Only icons imported in
icons.tsend up in the build output, so the size of the first screen doesn't depend on the total number of icons. - No network needed: icons are installed with
@m3e/iconsand render as inline SVG. There are no font files, and no flash of text before an icon font loads. - Follows the theme: icons use
currentColor, so they take their color from the M3 color role of the component they sit in, and follow changes to light and dark mode, contrast and dynamic color automatically. - Outlined and filled: every icon has a filled form, and the
filledattribute switches between the two. The selected item in the navigation uses it to mark the current location.
Icons in the theme
| Location | Icon source | Notes |
|---|---|---|
| rail and mobile drawer | The icon of each category in sidebar.categories in the shared config | Defaults to category; the current category shows the filled form |
| App bar | Built into the theme | Menu, search, more, settings and social links |
| Floating action buttons | Built into the theme | Back to top is keyboard_arrow_up; the table of contents is format_list_bulleted |
| Bottom of the rail | Built into the theme | The appearance button's icon changes with the mode; the language button is translate |
| Article body | <m3e-icon> in Markdown | Must be registered in icons.ts first |
Pages in this group
These three pages are a set of parallel pages: they appear as a single "Icons" item in the sidebar, and the tab bar at the top of the page switches between them. They are index.md, choosing.md and using.md in the styles/icons/ folder. To write pages like these, see Writing pages.