We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Apply bootstrap classes on button(btn btn-primary)

Hello Team,

I am using Syncfusion Button in a form but want to apply class(btn btn-primary) so that  it looks blue in color and match my site theme.

I am using class in the following way

@Html.EJ().Button("btnSaveDish").Type(ButtonType.Submit).Text("Save Dish").Size(ButtonSize.Medium).CssClass("btn btn-primary")

The class get applied but it is overidden by e-button-normal class colors.

Can anybody help me in getting through this.


1 Reply

FP Francis Paul Antony Raj Syncfusion Team August 30, 2016 03:18 PM UTC

Hi Manoj, 
Thanks for contacting Syncfusion support. 
You can change the appearance of button control using CssClass property. Background color, font color and desired styles can be changed by overriding the existing styles applied to the control element.  
If you have added bootstrap classes as CssClass, then it will be added at the root element of the widget and it doesn’t override the existing class values. So, please apply the style as to override the existing default values as mentioned in the below code example. 
    .primary.e-btn { 
        color: #fff; 
        background-color: #337ab7; 
    .primary.e-btn.e-select:hover { 
        color: #fff; 
        background-color: #286090; 
For your convenience, we have attached the sample in the below location, 
To know more about how to customize the Essential JS controls with user-defined styles, please refer to the below link:  
Also you can make use of ThemeStudio option available in our http://js.syncfusion.com/ demo site. With the help of this, you can customize our EJ controls with the desired theme.  
For more information, please refer the following link.  
For more information about Button control customization, please refer to,  
Please let us know, if you need any further assistance. 
Francis Paul A 

Live Chat Icon For mobile
Up arrow icon