Repository navigation
Icon Packs
Optris.Icons.Avalonia ships with three built-in icon providers. You can also create your own.
Package: Optris.Icons.Avalonia.FontAwesome
Prefix: fa
fa-{style} fa-{icon-name}
If you omit the style, the first available style is used:
<i:Icon Value="fa-github" /> <!-- picks first available style -->
<i:Icon Value="fa-solid fa-house" /> <!-- explicit solid style -->
<i:Icon Value="fa-regular fa-heart" /> <!-- explicit regular style -->
<i:Icon Value="fa-brands fa-github" /> <!-- brand icon -->| Style | Prefix | Short prefix | Description |
|---|---|---|---|
| Solid | fa-solid |
fas |
Filled icons (default) |
| Regular | fa-regular |
far |
Outlined icons |
| Brands | fa-brands |
fab |
Brand/logo icons |
Browse the full icon catalog at fontawesome.com/search?o=r&m=free.
Only Font Awesome Free icons are included. Attempting to use a Pro-only icon will throw a KeyNotFoundException with a message about unsupported pro icons.
To use Font Awesome Pro icons, register the provider with your own Pro icons.json. See Using Font Awesome Pro for the step-by-step recipe.
Older Font Awesome icon names (e.g. from FA 5) are automatically mapped to their FA 6 equivalents when possible.
Package: Optris.Icons.Avalonia.FontAwesome7
Prefix: fa7
fa7-{style} fa7-{icon-name}
If you omit the style, the first available style is used:
<i:Icon Value="fa7-github" /> <!-- picks first available style -->
<i:Icon Value="fa7-solid fa7-house" /> <!-- explicit solid style -->
<i:Icon Value="fa7-regular fa7-heart" /> <!-- explicit regular style -->
<i:Icon Value="fa7-brands fa7-github" /> <!-- brand icon -->| Style | Prefix | Description |
|---|---|---|
| Solid | fa7-solid |
Filled icons (default) |
| Regular | fa7-regular |
Outlined icons |
| Brands | fa7-brands |
Brand/logo icons |
Browse the full icon catalog at fontawesome.com/search?o=r&m=free.
Only Font Awesome Free icons are included. Attempting to use a Pro-only icon will throw a KeyNotFoundException with a message about unsupported pro icons.
To use Font Awesome Pro icons, register the provider with your own Pro icons.json. See Using Font Awesome Pro for the step-by-step recipe.
Both Font Awesome 6 and 7 can be registered and used simultaneously. This allows you to migrate gradually:
IconProvider.Current
.Register<FontAwesomeIconProvider>() // fa-* icons
.Register<FontAwesome7IconProvider>(); // fa7-* iconsPackage: Optris.Icons.Avalonia.MaterialDesign
Prefix: mdi
mdi-{icon-name}
<i:Icon Value="mdi-github" />
<i:Icon Value="mdi-home" />
<i:Icon Value="mdi-arrow-left" />Browse the full icon catalog at pictogrammers.com/library/mdi.
All providers can be registered simultaneously. The library routes icons to the correct provider based on the prefix (fa, fa7, or mdi):
IconProvider.Current
.Register<FontAwesomeIconProvider>()
.Register<FontAwesome7IconProvider>()
.Register<MaterialDesignIconProvider>();You can mix icons from different packs in the same view:
<i:Icon Value="fa-solid fa-home" />
<i:Icon Value="fa7-solid fa7-home" />
<i:Icon Value="mdi-home" />All icon sets are automatically synced from their upstream repositories via scheduled GitHub Actions. Updates are submitted as pull requests to keep the library current.