Skip to content

Icon Packs

Valentino Saitz edited this page Apr 22, 2026 · 3 revisions

Icon Packs

Optris.Icons.Avalonia ships with three built-in icon providers. You can also create your own.

Font Awesome 6 Free

Package: Optris.Icons.Avalonia.FontAwesome Prefix: fa

Value format

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 -->

Available styles

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 icons

Browse the full icon catalog at fontawesome.com/search?o=r&m=free.

Free vs. Pro

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.

Legacy name support

Older Font Awesome icon names (e.g. from FA 5) are automatically mapped to their FA 6 equivalents when possible.

Font Awesome 7 Free

Package: Optris.Icons.Avalonia.FontAwesome7 Prefix: fa7

Value format

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 -->

Available styles

Style Prefix Description
Solid fa7-solid Filled icons (default)
Regular fa7-regular Outlined icons
Brands fa7-brands Brand/logo icons

Browse icons

Browse the full icon catalog at fontawesome.com/search?o=r&m=free.

Free vs. Pro

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.

Using FA 6 and FA 7 side-by-side

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-* icons

Material Design Icons

Package: Optris.Icons.Avalonia.MaterialDesign Prefix: mdi

Value format

mdi-{icon-name}
<i:Icon Value="mdi-github" />
<i:Icon Value="mdi-home" />
<i:Icon Value="mdi-arrow-left" />

Browse icons

Browse the full icon catalog at pictogrammers.com/library/mdi.

Using multiple packs

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" />

Icon updates

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.