Blog

ExtJS and Sencha Touch Themes and Templates

Themes installation and “Look and Feel” configuration

Mar 05, 2009 | English | By | 3 Comments | Leer en Español

By default, the Ext JS components are displayed in light blue, which is a nice color but maybe not everyone likes it; this is why there are many different styles where you can choose from, install them and change the appearance of the components.

Themes installation and “Look and Feel” configuration
Author: Crysfel

I'm a software developer with 6+ years of experience, when I'm not developing software I may be writing a tutorial, you can follow me on twitter

Resources

For this chapter you need to download the resources which are at the top right of the screen, you need to unzip the file and copy the HTML to the folder “installation” that we have created in previous chapters. Don’t forget that this folder is found inside of the Web Server folder that you have installed at the beginning of this course.

Default Style

When we execute the HTML, the one we have downloaded, in the browser (Firefox, IE, etc) a light blue window will appear; this is the style that the Ext components have by default.

Default Ext JS theme

Installation of the themes

With the library you have previously downloaded there’s another theme in gray (ext/resources/css/xtheme-gray.css), you need to import this file to the HTML document that we have been working on, adding it after the file “ext-all.css” like this:

<link rel="stylesheet" type="text/css" href="../ext-2.2/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="../ext-2.2/resources/css/xtheme-gray.css" />

Ext JS gray theme

When you update the example page you can see that the color of the window has changed, now it is in gray.

Download and install themes from users

The user community of Ext have created many more themes, you can download them from the official site.

Once you have download a theme that you like unzip the file; there’s going to be two folders, one is called “css” and the other one is called “images”. To install this theme you need to copy the content of the folder “css” and “images” to the folder where the framework Ext is, in ext-2.2/resources/css and ext-2.2/resources/images respectively. After you have copied the folder you need to import the style to the HTML like this:

<link rel="stylesheet" type="text/css" href="../ext-2.2/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="../ext-2.2/resources/css/xtheme-slickness.css" />

This is how you install the new theme, update the page and you will see that the appearance of the window has changed.

Ext JS black theme

3 Responses to “Themes installation and “Look and Feel” configuration”

  • Eric Feb 01, 2011

    Hey thanks, i’m just beginning with extjs and i was wondering how to do :-)

    • Crysfel Feb 01, 2011

      You’re welcome!

  • Senthil Dec 02, 2011

    Crysfel, I am new to sencha touch,your tutorial is excellent,
    I started reading chapter by chapter :-)

Leave a Reply







Updates

RSS

Subscribe to our feeds to receive updates of our newest posts and free tutorials.

Site search

Maybe we have what you need, would you like to search first?

Donations

Would you buy me a cup of coffee? I am sharing my knowledge and time with you, help this project grow. Thank you!