Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
Applying different styles for outlined buttons
posted

Hello, I am trying to style buttons, and I want to have a different style for outlined buttons compared to normal buttons. There are some examples in the docs, but nothing for how to differentiate between specific types of buttons. How do I do this?

Parents
No Data
Reply
  • 740
    Offline posted

    Hello Jonas,

    Thank you for posting in our community!

    I have been looking into your question and what I can suggest is defining custom themes for each button as required and then passing them into your application via custom CSS classes as demonstrated in our Angular Button Styling section here.

    For example:

    <div class="custom-flat">
        <button igxButton="flat" igxRipple>Flat</button>
    </div>

    @use "igniteui-angular/theming" as *;
    
    $custom-flat-theme: button-theme(
        …
    );
    
    :host::ng-deep {
        .custom-flat {
            @include css-vars($custom-flat-theme);
        }
    }

    Here can be found a small sample demonstrating my suggestion. Please test it on your side and let me know if you need any further information on the matter.

    Looking forward to your reply.

    Sincerely,
    Riva Ivanova
    Software Developer

Children
No Data