Missed JavaScript Days 2026? The Replays Are Now Available – Watch Now!

Using Material Icons with Ext JS

February 5, 2020 5457 Views

Get a summary of this article:

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.

Author

Brandon Donnelson

Brandon Donnelson has been in the tech field for the last 19 years. He has worked on a variety of enterprise projects helping customers build complex apps, training developers and speaking at prominent conferences. Brandon currently works as a Sr. Product Manager at Sencha and is passionate about making developers’ life easier by introducing efficient, great quality products.

Recommended Articles

How to Use Tailwind CSS v4 in Ext JS (Classic) Without Breaking the Theme

We know that Ext JS is a war tank. When it comes to handling absurd volumes of data and complex front-end architectures, few frameworks come…

How to Use the Ext JS Grid in React: Setup, Columns, Editing and Grouping

Set up the Ext JS grid in React with ReExt, then add typed columns, store-backed data, inline editing, grouping and summaries. Full code included. The…

Understanding Ext JS Layouts and Containers: An Introduction (Classic vs. Modern)

Building complex, responsive, and data-intensive Web applications requires a solid layout engine. In Ext JS, the layout system is the backbone of your Application UI.…

AI-Driven Test Grading with Ext JS, Node.js, and OpenAI: A Secure Enterprise Architecture

Learn how to build an AI-driven test grading system with Ext JS, Node.js, MySQL, and OpenAI using secure API architecture, deterministic scoring, and human oversight.…

Sencha AI Just Got a Lot Bigger: One Chatbot, Every Sencha Product

Sencha’s AI assistant has grown from a focused Ext JS helper into a product-aware chatbot covering the whole Sencha suite. Here’s what’s new and why…

Building High-Performance Real-Time Operational Dashboards with Ext JS and React

Real-time operational dashboards are no longer simply reporting interfaces. In logistics, fleet management, supply chain operations, financial services, and other data-intensive environments, they are part…

View More