JS Days 2025 is now live – Join 5,000+ devs for the premier virtual JavaScript event. Register Now

Using Material Icons with Ext JS

February 5, 2020 3820 Views
Show

Typography connotes emotion and it’s as important as the visual elements in your application. There may be times you want to enhance your app with other font libraries. Here’s a quick and simple way to add a Material Font Icon from the Google fonts library. Not only can you do that, but it’s easy to change the default font too.

Ext JS and Material icons

Adding Material Icons to the Panel

Set up Google Material Design Icons
There is more than one way to setup the icon fonts (we are using the JS html import here).
Include this single HTML line to your web page:


Select your icons
Go to Material Icons and click on an icon click the tab “Selected Icon” on the lower left to view the text:


share

For example, if you’ve selected the accessibility icon, you will see this:



accessibility_new



accessibility_new

Adding Google Fonts to Ext JS Panel

  • Navigate to google fonts and choose a font by clicking on the (+) icon.
  • The selected fonts get added to the font families and are available to view on the bottom right corner. Follow the font import instructions to embed the fonts and specify in CSS. For example importing “Monoton” font results in this:

    
    

    Add the font-family style property to your css class.

    .myPanelText {
        font-family: 'Monoton', cursive;
    }
    

Combining Material Icons and Fonts

Instead of having two fonts imports, you can use one import with two font declarations in one import. Notice the pipe(|), which is used to delimit the fonts.

For example:


See it in Action

Hover over the text and the panel share icon…

Explore Ext JS Capabilities

Haven’t surveyed the full potential of Ext JS?
View Ext JS examples and explore the possibilities with our latest version Ext JS 7.1.

Recommended Articles

Guide to Estimating ROI When Switching From DIY Libraries to Full Software Development Platforms Like Ext JS

Teams started with Do It Yourself, or DIY, JavaScript tools like jQuery and Bootstrap. But those fall apart as projects scale. Scattered code, user interface…

Top Frameworks Developers Are Using for Custom Software Development in 2025

We’re seeing it more every year; teams aren’t settling for plug-and-play tools anymore. In healthcare, finance, logistics, and other data-heavy industries, there’s a clear shift.…

Meet Sencha AI Coding Companion: Your AI-Powered Assistant for Faster Ext JS Development

Building modern web applications should be exciting. But too often, developers find themselves buried in documentation, endlessly Googling framework quirks, or stuck solving the same…

Ext JS 7.9 & Rapid Ext JS V1.1 Have Arrived

The Sencha team is excited to announce the latest Ext JS version 7.9 and Rapid Ext JS 1.1 release – designed to accelerate development, enhance…

Top 10 JS Grid Customization Tips for a Better UI Experience

Grids are pretty much everywhere in web apps. Working with financial sheets, product details, or users? Then you’ve probably used a JavaScript grid. It makes…

Why Ext JS Framework is the Go-To Framework for Building Scalable and Data-Intensive Web Apps

Web apps are much more advanced now. They deal with large amounts of data and need to stay fast, even with many users. If you’re…

View More

Trusted by Top Developers: Learn how to enhance your development journey — for free

Get the latest newsletter keeping thousands of developers in the loop.

Loved by developers at