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
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

How to use glyphter svg icon in Button?

Platform: jQuery |
Control: ejmButton
Tags: button, mobile

You can create image only button with svg icon by using imageclass property. Refer to the following steps to achieve this.

  1. First, refer to the glyphter.css file to the sample. Example, here it is referred with file name glyphter.css that is generated from the glyphter generator.


/* Generated by Glyphter (http://www.glyphter.com)*/

@font-face {

    font-family: 'sample';

    src: url('../fonts/glyphter.eot');

    src: url('../fonts/sample?#iefix') format('embedded-opentype'),

         url('../fonts/sample.woff') format('woff'),

         url('../fonts/sample.ttf') format('truetype'),

         url('../fonts/sample.svg#sample') format('svg');

    font-weight: normal;

    font-style: normal;



 display: inline-block;

   font-family: 'glyphter';

   font-style: normal;

   font-weight: normal;

   line-height: 1;

   -webkit-font-smoothing: antialiased;

   -moz-osx-font-smoothing: grayscale







  1. Then, you need to overwrite the font family. Here, sample is set as a font-family while generating the font. Refer to the following code example.


<!DOCTYPE html>



    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no" />

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

    <meta name="apple-mobile-web-app-capable" content="yes" />

    <meta name="description" content="syncfusion" />

    <meta name="author" content="syncfusion" />


    <link href="themes/ej.mobile.all.min.css" rel="stylesheet" type="text/css" />

    <link href="themes/css/glyphter.css" rel="stylesheet" type="text/css" />

    <script src="scripts/jquery-1.10.2.min.js" type="text/javascript"></script>

    <script src="scripts/ej.mobile.all.min.js" type="text/javascript"></script>


        .glyphter {

            /*Set font family style as sample*/

            font-family: glyphter !important;








  1. Next, set the desired image to the button. For that we have to set the imageClass property as the image class that is generated from the gliphter generator. Add the font-family class with the custom icon’s image class. Refer to the following code example.


    <table id="table">



                Button Up


            <td class="btnsht">

                <button id="button11" type="button" data-role="ejmbutton" data-ej-contenttype="image" data-ej-imageclass="glyphter icon-up"></button>





                Button Down


            <td class="btnsht">

                <button id="button1" type="button" data-role="ejmbutton" data-ej-contenttype="image" data-ej-imageclass="glyphter icon-down"></button>





  1. Use the following styles to align the custom icon properly while using in button.



       .e-m-btnwrapper.e-m-ios7.e-m-btn-image .e-m-btn-tag {

            padding: 5px 10px;  


        .e-m-btnwrapper.e-m-flat.e-m-btn-image .e-m-btn-tag {

            padding: 8px 7px;





Mobile image button

You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile