Icon reference
Sizes, prefixes and the component API. For what these mean, see Overview. For how to choose between them, see Usage.
Sizes
| Class | Size | For |
|---|---|---|
| none | inherits, 1em | An icon sitting beside text. The usual case |
icon-marker | 12px | A glyph inside a dense marker, a tag or a badge |
icon-message | 32px | A glyph that is the subject of a message: an empty state, a card, a footer notice, a confirmation |
Both rungs are in pixels and do not move with the interface text setting. An inline icon does move with it, because it inherits. 12px is also the caption type step, so a marker glyph sits at the size of caption text.
There is no rung between 12 and 32, and no class that names one. A glyph that fits neither, such as the one centred in the 48px circle on an onboarding card, is measured against the shape around it.
The two sizes ship as --icon-marker and --icon-message. Each class is a utility declared from its variable in the app stylesheet, so a surface wiring its own stylesheet declares them again or the class name resolves to nothing.
Prefixes
| Prefix | Used for |
|---|---|
fas | The solid weight. Everything but the two cases below |
far | The regular weight. One place only: the entry that clears a row highlight, so its hollow circle reads as unfilled beside the solid circles that carry a colour |
fa-brands | Brand marks, which are a different family rather than a different weight |
Only the glyph name is rewritten. Every alias is keyed on a glyph name, so a prefix and any other class on the icon reach the stylesheet exactly as written.
Glyph names
Sixty older glyph names resolve to their current ones automatically, so a name that moved upstream, and a second spelling of one that did not, both still render. The resolution happens inside the component, so it applies to the icon prop and not to a class written directly on an element.
The component
| Prop | Type | Meaning |
|---|---|---|
icon | string | The glyph, such as fas fa-bug |
label | string, optional | The accessible name. Pass it only when the icon stands alone |
size | marker or message, optional | For a glyph with no text to inherit from |
What the component does with label:
label | Result |
|---|---|
| Passed | role="img" and an accessible name |
| Omitted | aria-hidden, so the icon is skipped by assistive technology |
An icon-only control
| Needs | Why |
|---|---|
| An accessible name | Without it the control does not exist for a screen reader |
| A tooltip | Without it a sighted person cannot learn what the glyph means |
| A pointer target of at least 24 by 24 CSS pixels | Nothing checks it, so it needs checking |
A tooltip does not provide an accessible name. The tooltip directive names its own container and sets nothing on the control but a data attribute.
The vocabulary
The glyphs the interface has settled on, grouped by the job they do. Reuse one of these before reaching for a new glyph, because a second drawing of a meaning that already exists is drift.
Acting on something
fa-plusfa-minusfa-trashfa-copyfa-pastefa-pencilfa-pen-to-squarefa-floppy-diskfa-downloadfa-file-importfa-rotate-leftfa-arrows-rotatefa-paper-planefa-playfa-pausefa-checkfa-xmark
Saying how something went
fa-circle-checkfa-circle-xmarkfa-triangle-exclamationfa-circle-infofa-circle-questionfa-spinnerfa-lockfa-circle
Moving and arranging
fa-chevron-rightfa-chevron-downfa-chevron-leftfa-caret-downfa-arrow-rightfa-arrow-leftfa-arrow-upfa-arrow-downfa-arrow-right-arrow-leftfa-up-right-from-squarefa-ellipsisfa-grip-verticalfa-layer-group
Things in Caido
fa-bugfa-sitemapfa-puzzle-piecefa-globefa-folderfa-folder-openfa-filefa-file-linesfa-magnifying-glassfa-filterfa-gearfa-slidersfa-userfa-eyefa-eye-slashfa-hard-drivefa-codefa-bolt-lightningfa-inboxfa-bookmarkfa-commentsfa-bookfa-medalfa-rocket
Those cover most of what the interface draws. The full set is Font Awesome Free solid, so a meaning that genuinely has no glyph here can take one from there, as long as it is not a second drawing of something above.
What not to write
| Avoid | Instead |
|---|---|
| A size on an icon beside text | Nothing. It inherits |
| A size between the two rungs | One of the two rungs |
| A glyph written as a class on a control | The component's icon prop, so resolution and labelling apply |
| A second glyph for a meaning that already has one | The glyph that meaning already uses |