Hello all,
can someone gve me an explanation how to use font awesome in radzen blazor?
Kind regards
Thomas
Hello all,
can someone gve me an explanation how to use font awesome in radzen blazor?
Kind regards
Thomas
Hi @enchev,
i would like to use font awesome icons. so far as is see there are only material icons in radzen blazor?!
If i want to use font awesome icons... how can i achieve that?
Regards
Thomas
Where do you want to use these icons? Do you want to replace Radzen components icons? Our components are using material icons and to overwrite them to use Font Awesome you need to rewrite the entire theme CSS.
Uh! Ok.
Then we will use images. Material font is out of question. Few people here dont like it
Thank you for clarification
Thomas
I may be late to the party but here's one way to use Font Awesome icons with the Icon attribute on Radzen components:
<RadzenButton Icon="@("<i class=\"fa-solid fa-x-ray\"></i>")" ButtonStyle="ButtonStyle.Primary" />
Whatever goes into the icon attribute goes into i tag and gets rendered.
Hope it helps.
You not late to the party, I'm in the future and your response helped me a lot. Thanks (ps. you may have forgotten the first fa, not a biggie though). Thanks a lot
<RadzenButton Icon="@("<i class=\"fa fa-solid fa-x-ray\"></i>")" ButtonStyle="ButtonStyle.Primary" />
or
<RadzenButton Icon="@FaIcon("fa-x-ray")" ButtonStyle="ButtonStyle.Primary" />
@code {
/// So can be a static method that can be accessed from all components I guess
string FaIcon(string icon) => $"<i class=\"fa fa-solid {icon}\"></i>";
}
Thanks to Ari and tisquip for helping!