When creating an Application using Appway Design System, you can customize the look and feel to be in line with brand guidelines.
This article is about theming, which refers to the customization of an application's look and feel. The additional related recipes are:
The Appway Design System is available as a downloadable product that contains two Packages, DesignSystem, and DesignSystemExamples:
- DesignSystem: A Package containing Screen Templates and Solution Components that you can drag and drop into your Screen. It also includes Style Business Objects and Style Value Business Objects that, together with the default styles of the Base Package, are necessary for the styling of an Application.
- DesignSystemExamples: A Package containing configured examples of the Design System.
You're using the Design System Packages and need to apply a client's brand guidelines to your Application. You have the client's brand book, and have identified the relevant brand design elements.
How can you successfully apply corporate branding to your Appway Application with the Design System?
The Design System UI can be styled thanks to the powerful Style Business Objects and Style Value Business Objects.
- Style Business Objects provide a modelled approach to specifying styling properties for Screen Components and their interactive states.
- Style Value Business Objects are used as values for Style Business Object properties providing a modelled approach to specify a single value of a styling property (such as a color or a size). The Design System predefines the elements used consistently across an entire application:
Most of the Style Business Objects (e.g. styles for Buttons, Headings, Icons, Text Field) and Style Value Business Objects (e.g. background colors, spacing units, font sizes) are found in the Base Package. By default, all Screen Components use the Style Business Objects in the Base Package. Changes to Style Business Objects or Style Value Business Objects in the Base Package are reflected across the Application. This includes the parts based on the Design System as well, since the Design System fully leverages the styles from the Base Package.
Important: The Style Business Objects in the Base Package are
not overridden when you update your Appway version, regardless of whether they were edited or not. See
Appway and Design System Upgrades for more information.
The Design System Package complements the Base Package with Design System-specific styles (such as Entity-related styles, Header layouts, and content maximum widths). The Business Objects in this Package may be updated by Appway as the Design System evolves.
- First, create a dedicated Style Package so you have a container to manage all the Business Objects related to your brand’s theme.
The best way to create and maintain Style Business Objects are the
Style Package Tools. These tools provide step by step guidance in creating copies of Style Business Objects into a Style Package specified as destination.
- To create the style definitions of your theme, start with defining Style Value Business Objects, since these are the constants that are used recurrently by different Style Business Objects. See the following section for more details.
Working with Style Value Business Objects that correspond to predefined Style Value Business Objects in the Base and DesignSystem Packages ensures consistency throughout the Application.
Each of the predefined Style Values serves a purpose. The Style Value Business Object color - CallToAction-default, for example, is defined as the 'background or text of primary buttons'.
Note: Predefined Style Values are explained in the
Theming section of design.appway.com.
If you modify the Style Values found in the Base Package, Appway applies a logical change to the Base Package Style Business Objects and Design System Business Objects that use that Style Value Business Object.
If you change the 'CallToAction-default' Style Value Business Object, the backgrounds of the Default Button and Navigation Buttons, and the text color of the Primary Button, are automatically updated. This is the desired behavior from a UX perspective: users then associate a specific color with a certain 'call to action'.

As shown in the image above, once you select the 'CallToAction-default' Style Value Business Object, you can check where that specific Style Value Business Object is used.
Originally defined in the DesignSystem Package, several predefined Style Values help you modify the Design System modules in a global way. These Style Value Business Objects are module-specific, and do not affect Screens where these modules are not used. For example, if you want to change the background color of the Space Screen Header, modify the 'Color—Space Header' Style Value Business Object. The changed color is then reflected wherever this Solution Component is used.
Try to avoid creating new Style Value Business Objects unless really necessary. When is creating new Business Objects reasonable? One example is when changing Style Values affects elements onscreen that you didn't wish to modify.
Let's make an example: You've been asked to change the background color of the Proceed Navigation button to green (but not to change the color of any other of the navigation buttons). You've noted the inconsistency that this brings to the Application, but the team still moves forward with this decision. You access the 'Button-navigation' Style Business Object and notice that 'CallToAction-default' Style Value Business Object is used as the background. Rather than applying the changes to 'CallToAction-default', you'll need to apply changes directly to the 'Button-navigation' Style Business Object.
Should you modify the Style Business Object in place by setting an inline value for the color, or create a new Style Value Business Object to implement this change? The answer is: it depends on where else this particular shade of green is going to be used in the Application.
a) If it is only for this button, apply the change directly to the Style Business Object in order to avoid creating unnecessary abstraction.
b) If this color is going to be used multiple times, however, it is then worth understanding the pattern where it is used, and defining a Style Value Business Object for that specific green.
Important: When you define a new color Style Value that is used by Business Objects within the Base Package, that Style Value must be housed in the Base Package as you cannot make the Base Package dependent on other Packages. If you decide to work within the Base Package, rather than your own Style Package, create a custom list to keep track of these additional styles.
Important: Only move on to editing Style Business Objects once you have customized all applicable Style Value Business Objects.
Avoid creating new Style BOs unless really necessary. Instead, work with Style Business Objects that correspond to predefined Style Business Objects in the Base and DesignSystem Packages.
The Style Business Objects in the Base and DesignSystemStyles Packages are created in such a way that, if modified, the changes affect several modules (e.g. Entity-related Style Business Objects), or are specific to certain prebuilt modules (e.g. Header-related Style Business Objects).
An example of a change that would affect several modules would be modifying the font weight of the Entity’s title. If you require a bolder font, changing the font-weight property of the ‘Entity_Text-title’ Style Business Object would do the trick. As you can see in the image below, this affects each Entity Component (including the mobile version). This is by design: Consistency across Entities is desirable.

What happens if you require a more slimline font for the Activity Screen main heading? The approach is the same. Change a Style Business Object — in this case, the 'Heading1-ActivityHeader'. The change only affects the Activity Screen heading.
Why would this change affect only the headings in the Activity type of Screen, and not the other types of Screen? This is again by design, based on the 'landmarking' principle: it should be easy for users to differentiate between Screen types, and the headers are a key factor in achieving this. Therefore, changes to Screen types' main headings should be handled separately.
When can you think about creating new Business Objects? One example would be when you need to create and style additional screen elements that are not covered by the Design System, such as a footer for adding copyright information.
This is where a new, custom, Style Package can come into play. Alternatively, you could create the additionally necessary Style Business Objects and Style Value Business Objects inside the Style Package you are already using to brand your solution.
Be conservative with adding new Business Objects, since the more Business Objects you create, the greater the complexity when styling. Try to follow the same approach as the DesignSystem Package, where Business Objects are created with a system in mind, and naming follows a pattern similar to the Block Element Modifier notation (BEM).
Important: If the Style Business Object you are going to create is similar to a pre-existing one, duplicate it and move it to your own Styles Package. Always be aware of dependencies with other Packages! Be aware that changes may be made to Style Business Objects from the DesignSystem Package.
The most common customization is changing the colors used across your Application. Based on the information in Chapter 2 above, you would need to modify the Style Value Business Objects in the Base, DesignSystem, or own Styles Package in order to achieve this.

Colors are quite easy to change. For our predefined Style Value Business Objects we always define the name Color – as an ID prefix. Once you select one of these Business Objects, click the editable field to open a color picker. Select the desired color from the interactive color tool, or input RGB, HSB or HEX formats. You can also increase or reduce color opacity.
Another very common request for solution branding is to add the company logo. The logo is usually located on the top-left side of the Screen Template.

To properly assign your own logo on the Design System:
- In your Application-specific Package, add a Resource Business Object containing an image.
Recommended image specs:
- Image formats are .gif, .png or .jpg (SVG may cause layout issues)
- Image dimensions are 90px width by 30px height
- The Image should have a transparent background so as to use the corresponding header background
- Create a 'Logo' Screen Business Object in your Package and insert the logo image by using the Image Screen Component.

- To set the Design System image style, assign the style 'DesignSystem:LaunchHeader_Image-logo'. To set custom style definitions, first create and then assign 'LaunchHeader_Image-logo' from your own Style Package.
- Add the image Screen as a replacement in the Package configuration:

- In the configuration of the DesignSystem Package, replace the 'Logo' Screen with your newly created Screen:

- On the Screen Templates where you wish to display the logo: set the
$showLogo variable to true.
Info: For the End Screen Template you require an "inverted" logo since the End Screen Header uses a dark background. Due to this, you should go through the same steps, but creating another Screen Business Object, using the 'DesignSystem:Logo-inverted' Style Business Object and replacing 'DesignSystem:Logo-inverted'.
On compact screens, where a large logo could cause layout issues, the Design System supports a smaller-size logo version.

To properly assign a specific logo for compact screens on the Design System:
- In your Application-specific Package, add a Resource Business Object containing an image.
Recommended image specs:
- Image formats are .gif, .png or .jpg (SVG may cause layout issues)
- Image dimensions are 30px width by 30px height
- The image should have a transparent background so it uses the corresponding header's background
- Create a 'LogoMinimized' Screen Business Object in your Package and insert the logo image by using the Image Screen Component.
- To set the Design System image style, assign the style 'DesignSystem:LaunchHeader_Image-logo'. To set custom style definitions, first create and then assign 'LaunchHeader_Image-logo' from your own Style Package.
- Add the image Screen as a replacement to the 'LogoMinimized' Screen in the Package configuration.
- In the configuration of the DesignSystem Package, replace 'LogoMinimized' Screen with your newly created Screen.
- On the Screen Templates where you wish to display the minimized logo: set the
$showLogoMinimized variable to true. It is required to have the Desktop logo enabled (set $showLogo to true) to display a minimized logo.
Info: For the End Screen Template you require an "inverted" logo since the End Screen Header uses a dark background. Due to this, you should go through the same steps, but creating another Screen Business Object, using the 'DesignSystem:LogoMinimized-inverted' Style Business Object and replacing 'DesignSystem:LogoMinimized-inverted'.
Customizing an application is not only about the main User Interface (UI). The Application favicon (the icon on the browser tab) and page title (the text that appears on the browser tab) are examples of out-of-UI branding. For this type of customization you should use the HTML Head Title and HTML Head Link Screen Components.

Such changes need to be applied on every Screen. But how can you follow the 'Don't Repeat Yourself' principle and only configure/add these components once?
HTML Head components are flexible enough so that once they are added anywhere to a Screen, the desired element is injected into the <head></head> of the HTML Document. You don't need to add an HTML Head component in a specific location for it to work; once you have added such a component somewhere within that Screen, the element is rendered.
The recommended approach to implementing a custom favicon and tab text is to create your own custom 'HTML Head Customization' Include. Add all of the HTML Head Screen Components required to this Include. Add the Include to your Style Package's BrandTemplate Screen, as described in Style Packages: Styling Applications.
The default font family used in the Appway Workspace is Source Sans Pro (with Helvetica, Verdana, Arial and sans-serif as fallback font families). The Source Sans Pro font family works well on user interfaces, and our components are optimized to use it.
A corporate typeface is, however, often a key identifying factor in most companies' brand guidelines and, therefore, you may need to change the font family used in your Application.
In the following example, your company is asking you to apply the Roboto Condensed font family to your Application. Note that 'Roboto Condensed' is not just one file: There is a font file for each font weight (100 to 900). If there are styles (italic, for example) there should also be a font file with that style for each specific font weight.

Let's change the font family step by step:
1 Add the font family to the Style Business Object Editor
To add Roboto Condensed as an option, add the font to your System configuration.
a. On the Studio sidebar, go to System Configuration > Configuration Properties.
b. Click the hamburger button and select Server Configuration.
c. In the Edit Content Configuration window, add the font family like this: nm.workspace.styleBO.fonts = Roboto Condensed and click Save.
If you now access any Style Business Object, you'll be able to select Roboto Condensed from the dropdown.

Important: The preview in the Style Business Object Editor outputs the browser's fallback font. To properly test the visual output after completing all steps, you'll need to see it on an actual Screen.
2 Add font files
In order to use a font family, you need to upload the required Font Files as resources to your Application Styles Package.
There are various types of Font-files that can be used: .ttf, .otf, .woff, .svg, and more. We recommend using the .woff file type for browser compatibility and web optimization. If the project doesn't use font files of this type, please use the next best font file type depending on required browser compatibility. You can find further guidance and documentation regarding font files and browser compatibility here: https://www.w3schools.com/css/css3_fonts.asp.
Important: Font families usually do not contain all possible font weights and styles. Be aware of the limitations of your chosen font family! Don't design a text element using a non-existent font face (font/weight/style combination): most browsers then start improvising and try to render the closest font style, based on available font files. This is bad practice because that text element is then rendered differently across browsers and screen resolutions. Always style text using only the specifications (weight, style) in the font files you have available.
Create a Resource Business Object for each individual font file. To avoid confusion, use the filename as the name of the Resource Business Object. If the filename contains invalid characters, adapt the filename before using it to name the Resource Business Object.
Important: Avoid using font files hosted by third parties. Most Appway solutions contain sensitive information that is highly protected on production instances. To avoid any broken file links when migrating from a development environment to production, we recommend hosting the required font files in-house.
3 Declare fonts in the CSS file
You are now able to select the font family and have the font files in your system. You cannot properly link them yet because HTML5 Documents require font files to be referenced from the Document's HTML <head></head>. We recommend you create a 'Fonts' CSS file where your font files are referenced, and insert this CSS file into the <head></head>.
Here's how to build this 'Fonts' CSS file:
1. The 'Fonts' CSS file needs to be housed in the application's Style Package.
2. Create the Resource in this Style Package.
3. Create a .css file (You may use Notepad or any text editor). Name your CSS file using the same ID as the Resource just created.
4. Add the following snippet to the CSS file:
@font-face {
font-family: 'Roboto Condensed';
src: url('../../../../_assets/fonts/3a1cf3e42e_roboto-condensed-normal.woff'),
url('../../../../_assets/img/19fd5c1c86_roboto-condensed-normal.svg');
font-weight: 400;
font-style: normal;
}
This snippet has several parts:
@font-face { } defines a new font font/weight/style combination and references to the font files that follow those parametersfont-family: 'Roboto Condensed' defines the font family this font belongs tosrc: Font file sourceurl(' '), URL or link to a file. This example shows files for the same font, but of different file types (.woff and .svg)font-weight: 400; and font-style: normal; define the weight and style properties of this particular font.
Important: Double-check that the spelling of the Resource's ID and the filename are identical. Most errors occur due to unintentional typos.
Commit the font file Resources (because the LatestCommittedFilter is part of the URL!)
You probably need multiple fonts (e.g. bold, light italic, bold italic, etc.) across your Application. To achieve this, all you need to do is adding another @font-face declaration for each style. In the example below, we are using a regular and a bold font weight.
/* Regular */
@font-face {
font-family: 'Roboto Condensed';
src: url('../../../../_assets/fonts/3a1cf3e42e_roboto-condensed-normal.woff');
url('../../../../_assets/img/19fd5c1c86_roboto-condensed-normal.svg');
font-weight: 400;
font-style: normal;
}
/* Bold */
@font-face {
font-family: 'Roboto Condensed';
src: url('../../../../_assets/fonts/23f186057c_roboto-condensed-bold.woff');
url('../../../../_assets/img/27bf84a409_roboto-condensed-bold.svg');
font-weight: 700;
font-style: normal;
}
4 Add Link to CSS Resource on Main Template
All Screens where custom fonts are used are required to have a Head link pointing to the CSS file. Part of a solution's brand customization process requires the creation of a HTML Head Customization Include. Since this Include gets applied to all Screens, we can add the HTML Head Link Screen Component pointing to the resource where the CSS file.
5 Add Permission for Font File Types
For logged-in users: If an element is styled using custom fonts, and these custom fonts are referenced in the head of the screen according to the steps mentioned above, that element now displays using that custom font.
For non-logged-in (anonymous) users, additional steps are required:
- Add the font file type to a system configuration type list to enable anonymous access to this file type by going to System Configuration > Configuration Properties.
- Click the hamburger icon and add a new server configuration, written like this:
nm.workspace.resource.filetypes.anonymousaccessallowed = js,css,jpg,jpeg,png,gif,woff,svg.
The first six elements (js … gif) are part of the list by default. These elements should be added again to the list if this configuration is modified. The last two (woff and svg) are the new font file type.
The Design System Packages evolves thanks to user feedback. We are very much open to questions and suggestions. If you have any feedback or bug reports regarding the Design System, please open a ticket on community-legacy.appway.com using the project "Appway - Platform - Design System".