Add svg icon in primeng button

Discussão em 'Angular' iniciado por Lucky, Fevereiro 28, 2025.

  1. Lucky

    Lucky Guest

    I want to add a .svg image instead of icon in primeng buttons, I want to display text on left side of the button and svg image on right corner in the same button.

    I can achieve the same using prime icons with the below code, but i should achieve the same using svg image instead of that icon.

    <button class="p-col-9 font_13" pButton iconPos="right" label="Hello!!" icon="fa fa-star">
    </button>


    Have already tried the below code, it shows up the image but breaks the whole UI and becomes unresponsive.

    <button class="p-col-9 font_13" pButton label="{{floor.floor}}">
    <img src="../assets/icons/Right_Chevron.svg">
    </button>

    Continue reading...

Compartilhe esta Página