Change button color/style

1 Answer 3007 Views
Button
Alex
Top achievements
Rank 1
Alex asked on 22 Mar 2017, 03:07 PM

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!

 

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 23 Mar 2017, 06:22 AM
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.
Tags
Button
Asked by
Alex
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or