Docs Help

Terms, Icons, and Labels

Many classes have shortcut names used when creating (instantiating) a class with a configuration object. The shortcut name is referred to as an alias (or xtype if the class extends Ext.Component). The alias/xtype is listed next to the class name of applicable classes for quick reference.

Access Levels

Framework classes or their members may be specified as private or protected. Else, the class / member is public. Public, protected, and private are access descriptors used to convey how and when the class or class member should be used.

Member Types

Member Syntax

Below is an example class member that we can disect to show the syntax of a class member (the lookupComponent method as viewed from the Ext.button.Button class in this case).

lookupComponent ( item ) : Ext.Component
protected

Called when a raw config object is added to this container either during initialization of the items config, or when new items are added), or {@link #insert inserted.

This method converts the passed object into an instanced child component.

This may be overridden in subclasses when special processing needs to be applied to child creation.

Parameters

item :  Object

The config object being added.

Returns
Ext.Component

The component to be added.

Let's look at each part of the member row:

Member Flags

The API documentation uses a number of flags to further commnicate the class member's function and intent. The label may be represented by a text label, an abbreviation, or an icon.

Class Icons

- Indicates a framework class

- A singleton framework class. *See the singleton flag for more information

- A component-type framework class (any class within the Ext JS framework that extends Ext.Component)

- Indicates that the class, member, or guide is new in the currently viewed version

Member Icons

- Indicates a class member of type config

- Indicates a class member of type property

- Indicates a class member of type method

- Indicates a class member of type event

- Indicates a class member of type theme variable

- Indicates a class member of type theme mixin

- Indicates that the class, member, or guide is new in the currently viewed version

Class Member Quick-Nav Menu

Just below the class name on an API doc page is a row of buttons corresponding to the types of members owned by the current class. Each button shows a count of members by type (this count is updated as filters are applied). Clicking the button will navigate you to that member section. Hovering over the member-type button will reveal a popup menu of all members of that type for quick navigation.

Getter and Setter Methods

Getting and setter methods that correlate to a class config option will show up in the methods section as well as in the configs section of both the API doc and the member-type menus just beneath the config they work with. The getter and setter method documentation will be found in the config row for easy reference.

History Bar

Your page history is kept in localstorage and displayed (using the available real estate) just below the top title bar. By default, the only search results shown are the pages matching the product / version you're currently viewing. You can expand what is displayed by clicking on the button on the right-hand side of the history bar and choosing the "All" radio option. This will show all recent pages in the history bar for all products / versions.

Within the history config menu you will also see a listing of your recent page visits. The results are filtered by the "Current Product / Version" and "All" radio options. Clicking on the button will clear the history bar as well as the history kept in local storage.

If "All" is selected in the history config menu the checkbox option for "Show product details in the history bar" will be enabled. When checked, the product/version for each historic page will show alongside the page name in the history bar. Hovering the cursor over the page names in the history bar will also show the product/version as a tooltip.

Search and Filters

Both API docs and guides can be searched for using the search field at the top of the page.

On API doc pages there is also a filter input field that filters the member rows using the filter string. In addition to filtering by string you can filter the class members by access level and inheritance. This is done using the checkboxes at the top of the page.

The checkbox at the bottom of the API class navigation tree filters the class list to include or exclude private classes.

Clicking on an empty search field will show your last 10 searches for quick navigation.

API Doc Class Metadata

Each API doc page (with the exception of Javascript primitives pages) has a menu view of metadata relating to that class. This metadata view will have one or more of the following:

Expanding and Collapsing Examples and Class Members

Runnable examples (Fiddles) are expanded on a page by default. You can collapse and expand example code blocks individually using the arrow on the top-left of the code block. You can also toggle the collapse state of all examples using the toggle button on the top-right of the page. The toggle-all state will be remembered between page loads.

Class members are collapsed on a page by default. You can expand and collapse members using the arrow icon on the left of the member row or globally using the expand / collapse all toggle button top-right.

Desktop -vs- Mobile View

Viewing the docs on narrower screens or browsers will result in a view optimized for a smaller form factor. The primary differences between the desktop and "mobile" view are:

Viewing the Class Source

The class source can be viewed by clicking on the class name at the top of an API doc page. The source for class members can be viewed by clicking on the "view source" link on the right-hand side of the member row.

Themer 1.0.2

Guides
API
top

Creating Themes with Themer

In this guide, we will use Sencha Themer to create a custom theme and apply it to the example FeedViewer application. By walking through the steps of this guide, you’ll see the application updated live in the browser thanks to the superpowers of Fashion.

Themer works with both Modern and Classic Toolkits, so we'll walk through the process of theming for both.

Once all of the steps are complete, our Classic FeedViewer will look like this:

image alt text

Our Modern FeedViewer will look like this:

image alt text

Let's get started by looking at the things we'll need to get started.

Prerequisites

Before getting started, make sure that you have downloaded and installed the following assets.

Ext JS

Themer requires Ext JS 6.0.1+ for the Classic Toolkit and Ext JS 6.2+ for the Modern Toolkit. You can download Ext JS from the Support portal, or you can also find it within your premium download. If you do not have access to Ext JS, you can download a 30 day free trial.

Note: UI theming is only supported for Ext JS 6.2+.

Sencha Cmd

Themer requires Sencha Cmd 6.2+. Sencha Cmd is a free tool that can be acquired via the download page. If you already have Sencha Cmd, you can also update it via the command line by issuing the following command:

sencha upgrade

Themer

You can find Themer within your premium download. If you do not have premium, you can download a 30 day free trial of Sencha Themer.

Setting up your Workspace

Next, download our sample workspace that contains two applications - FeedViewer and StarterApp.

The source of this application can be found here. You can download from Github by clicking the green "Clone or Download" button. Then just click "Download Zip" and save the file to your machine.

Once downloaded, unzip "SenchaThemerDemo-master.zip" and move the resulting directory to wherever you'd like your application to live.

Once you have your application where you want it, "cd" into the FeedViewer application directory inside your workspace. Finally, issue the following command to copy Ext JS to the workspace.

sencha app install --framework=/path/to/extjs/ 

Next we'll create a theme using both toolkits.

Creating a Theme for the Classic Toolkit

Creating a Theme for the Modern Toolkit

Creating a Theme for the Classic Toolkit

Sencha Themer is able to create themes for the Classic Toolkit (Ext JS 6.0.1+) and Modern Toolkit (Ext JS 6.2+). We’ll start out by creating a theme to be used by an application using the classic toolkit.

From the FeedViewer application directory run:

sencha app watch -fashion classic

Note: You may need to run "sencha app upgrade" depending on your cmd version. If so, Cmd will prompt you to do so when running "app watch".

Once "app watch" is running, you can open the FeedViewer application in your browser. You'll generally find your application running at

http://localhost:1841/FeedViewer

Note: If you are running "sencha app watch" elsewhere, your port may vary. Check the terminal output of “sencha app watch” for the correct URL.

Finally, we're ready to open Themer

Create a New Theme

First, we’ll create a custom theme that is effectively a copy of an existing framework theme that we’ll modify with Themer.

Once Themer launches click the "Create Theme" button. Name your custom theme "FeedView".

In the App or Workspace field, select the "SenchaThemerDemo-master" directory that you recently unzipped.

Select "triton" as the base theme and then click "Create Theme".

Make sure you have "Classic" tab panel selected which you can find at the bottom of components view

Apply Theme to FeedViewer App

Next, let's apply this new theme to our FeedViewer application.

To do this, go to "Publish" in the top menu. Select "Apply Theme to App(s)" and then select "FeedViewer" from the menu and apply our new theme by clicking "Apply to Selected".

image alt text

Now, if you're watching your terminal, you'll see that "app watch" is digesting the changes that it just received. However, if you're watching your application, you probably won't see a change, because we haven't deviated from the triton theme yet. Let's make some changes!

Modifying Application Settings

Let's start making changes with something that will make a very noticeable difference. Let's change the application's base color. This is the color that dictates the base color of your entire application.

Base Color

Let's change the Base Color to "#00897B" in your Theme Defaults.

image alt text

If you're watching your application, you should see the entire application apply the new green color via Fashion.

In the next few steps, we'll apply some more visual changes that will close the delta between the default triton settings and our goal application's "Mint Chocolate Chip" theme.

Let's make some more changes!

Background Color

From the same menu as before, let's change Body Background from #ffffff, to #404040

Grid Row Selected

Next, let's delve into a component within our application. We can do this by selecting "Grid" from the components tree on the left. Then choose "Basic Grid".

image alt text

You should see your canvas change to display a mocked up grid. You'll also notice that the settings on the right have changed to display grid attributes. There are a lot of options here so let's scroll down until you see "Grid Row Cell Selected".

Let's make the Background color the same as our Green base color. You can either type the hex again ("#00897B"), or, you can use a handy feature found in Themer. If you click the color box, it will display your base color, body background color, and font color. You'll also see lighter and darker options for accents to the left and right.

image alt text

In this case, we'll select the top emphasized box, which represents "#00897B".

Note: You may not see changes in your application if you don't have a grid row selected. Select a feed from the left to see the green background when selected.

This change has caused the selected text to be a bit difficult to read when a row is selected. In the same section, select "Text Color". Either change it to "#ffffff" or select the box to the right of the hex area. Select the bottom box (default font color) from the emphasized boxes.

Splitter Colors

Next, let's modify the splitter. Select "Layouts" from the component library on the left. Then select "Border".

Let's first modify the splitter's background color. Change "Background" to "#333333".

Next, scroll down to the "Splitter Collapse Tool" and change the "Background" to "#5A5A5A" and change "Glyph Color" to "#404040".

Next let's change the default link color for our application. Select "Links" from the component list on the left.
Change the Default Link "Text Color" to "#ffee58". Then change the Hover Link "Text Color" to "#00D5C0" and change "Text Decoration" to "none".

Tab Border Radius

Finally, let's change the tab radius border. Select "Tabs" from the component list on the left and select "Tabs".
Scroll down to "Tab" on the right and change the Top Left and Top Right "Border Radius" to 5px.

image alt text

Using Google Fonts

Themer also allows you to utilize Google fonts in your applications. Before changing the font, you'll need to get the Google Font URL. For this example, we'll use Raleway. Go to the corresponding Google Fonts page, and copy the web link.

The resulting link should be:

https://fonts.googleapis.com/css?family=Raleway

Now, in Themer, select "Tools" from the top menu and select "Manage Web Fonts". Paste in the Raleway URL and click "Done".

Finally, click on "Theme Defaults" from the component tree on the left. From the font section select the newly added "Raleway". Your application should update momentarily.

Using the Inspect Tool

Not all changeable aspects of our application are readily apparent. In some cases, we'll need to use the "Inspect" tool to discover certain states of a component. In this case, we want to modify our Active Tab state.

Tab States

Click the "Inspect" button in the Theme Defaults section of the canvas.

image alt text

Your cursor will turn red once you're in inspect mode. Select "Tab 1" in the canvas.

image alt text

You should now see attributes that can be modified for different states for Tab 1. Let's change the "Active Tab" font color to "#ffffff".

Note: You may need to scroll down on your right side attributes to find the "Active Tab" section.

Now, let's modify an inactive tab. Select "Tab 2" in our canvas since it's not "active". Let's find the "Over Tab" section and change the "Base Color" to #4d4d4d. Then, drag the "Background Opacity" slider to 30.

Header Tool Color

Next, let's change the panel header's tool icons to a different color. Go to "Panels" in the component tree on the left and select "Basic Panel". Next, let's go back into "Inspect" mode by click the "Inspect" button. Click on any of the tools in the panel header and change the "Tool Color" to "#ffffff".

Toolbar Button Background

Finally, let's modify the toolbar button background. Select "Theme Defaults" from the left and then click "Inspect" to enter "Inspect Mode". Select a button from the top toolbar.

image alt text

Scroll down to "Toolbar Button" on the right. We're going to change "Button Background" to our base color. Remember you can do that by clicking the color box next to the hex code and selecting the top emphasized box.

Export Theme

Once you are happy with the look and feel of your FeedViewer app, export your new theme. To export your theme, simply select "Publish" from the top Themer menu and then select "Export Theme as Zip Archive".

Your theme is now ready to share with other applications!

Creating a Theme for the Modern Toolkit

Next, let's create a theme for the Modern Toolkit!

Note: You do not need to have created a Classic theme in order to move forward. This is a perfectly fine starting point.

From the FeedViewer application directory run:

sencha app build modern

sencha app watch -fashion modern

Note: You may need to run "sencha app upgrade" depending on your cmd version. If so, Cmd will prompt you to do so when running "app watch".

Once "app watch" is running, you can open the FeedViewer application in your browser. You'll find your application running in full desktop at this address:

http://localhost:1841/FeedViewer/?toolkit=modern

You can also view your application at FeedViewer by switching Chrome into Device Mode:

http://localhost:1841/FeedViewer/

Note: You can enter device mode by clicking on the following icon:

image alt text

Note: If you are running "sencha app watch" elsewhere, your port may vary. Check the terminal output of “sencha app watch” for the correct URL.

Create a New Theme

First, we’ll create a custom theme that is effectively a copy of an existing framework theme that we’ll modify with Themer.

Once Themer launches click the "Create Theme" button. Name your custom theme "FeedViewModern".

In the App or Workspace field, select the "SenchaThemerDemo-master" directory that you recently unzipped.

Select "triton" as the base theme and then click "Create Theme".

Once the canvas loads, make sure you have "Modern" button selected which you can find at the bottom of the components list.

image alt text

You should now see a canvas that represents a modern viewport.

Apply Theme to FeedViewer App

Next, let's apply this new theme to our FeedViewer application.

To do this, go to "Publish" in the top menu. Select "Apply Theme to App(s)" and then select "FeedViewer" from the menu and apply our new theme by clicking "Apply to Selected".

image alt text

Now, if you're watching your terminal, you'll see that "app watch" is digesting the changes that it just received.
However, if you're watching your application, you probably won't see a change, because we haven't deviated from the triton theme yet. Let's make some changes!

Modifying Application Settings

Let's start making changes with something that will make a very noticeable difference. Let's change the application's base color. This is the color that dictates the base color of your entire application.

Base and Background Color

Let's change "Base Color" and "Background Color" to "#404040" in your Theme Defaults.

image alt text

If you're watching your application, you should see the entire application apply the new darker via Fashion.

In the next few steps, we'll apply some more visual changes that will close the delta between the default triton settings and our goal application's "Mint Chocolate Chip" theme.

Let's make some more changes!

Toolbar Background

Next, we'll add some green to this theme. Select "Toolbar" from your component list on the left side of Themer. Let's change Toolbar's "Background Color" to "#00897B".

Button Styles

Next, let's fancy up our buttons. Click on "Button" from your component list on the left side of Themer. First, let's change the Button's "Background Color" to "#404040".

Uh oh, now the text is difficult to read. Let's change Button's "Text Color" to "#ffffff".

image alt text

Much better! As a final touch, let's add a darker border color to our button. Change Button's "Border Color" to #1A1A1A".

List Items

Lastly, let's add some style to our list items! Click on List in your Components list on the left.

First change List's "Border Color to "#666666". Next, scroll down the list of attributes on the right until you reach "Selected Background Color". Change that to "#00BCA9".

Finally, let's change the small arrow on the list items. This is called a Disclosure Icon. Scroll down the list of attributes on the right until you reach Disclosure Icon and change its "Icon Color" to "#4DB6AC".

Looking good!

Using Google Fonts

Themer also allows you to utilize Google fonts in your applications. Before changing the font, you'll need to get the Google Font URL. For this example, we'll use Raleway. Go to the corresponding Google Fonts page, and copy the web link.

The resulting link should be:

https://fonts.googleapis.com/css?family=Raleway

Now, in Themer, select "Tools" from the top menu and select "Manage Web Fonts". Paste in the Raleway URL and click "Done".

Finally, click on "Theme Defaults" from the component tree on the left. From the font section select the newly added "Raleway". Your application should update momentarily.

Note: If you already did this step in the Classic section, you may already see Raleway as an option.

Export Theme

Once you are happy with the look and feel of your FeedViewer app, export your new theme. To export your theme, simply select "Publish" from the top Themer menu and then select "Export Theme as Zip Archive".

Your theme is now ready to share with other applications!

Themer 1.0.2

Ext JS
Sencha Test
Cmd
Sencha Themer
GXT
IDE Plugins
Sencha Inspector
Architect
Sencha Fiddle
Touch
Offline Documentation

Sencha Test

2.0.1 2.0.0 1.0.3

Cmd

Cmd

Sencha Themer

1.1.0 1.0.2

GXT

4.x 3.x

IDE Plugins

IDE Plugins

Sencha Inspector

Sencha Inspector

Sencha Fiddle

Sencha Fiddle

Offline Documentation

Offline Documentation