Change button color/style

2 posts, 0 answers
  1. Alex
    Alex avatar
    55 posts
    Member since:
    May 2015

    Posted 22 Mar Link to this post

    Is there any classes I can add to a button to change the styling similar to bootstrap's "btn-danger"?

    For buttons that do potentially dangerous things, I would like to add special styling to them but not have to worry about if the text color will be correct. Currently there is the "Primary" attribute, but it'd be great if there were other categories.

     

    I understand adding features like that isn't easy to do quickly, but if there are any classes I can add to a normal kendo button to change color and style that's be great!

     

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1332 posts

    Posted 23 Mar Link to this post

    Hello Alex,

    We do not have predefined classes and styles associated with them that would make a Kendo Buton look like a Bootstrap danger button. You can however set a custom class to it and apply your own styles, in order to achieve the desired appearance, for example:
    .HtmlAttributes( new { @class = "kendoDanger" } )

    .kendoDanger {
      background-color: red;
      color: white;
    }
     
    .kendoDanger:hover {
      background-color: darkred;
      color: white;
    }

    Regards,
    Ivan Danchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top