Skip to main content

Developing with themes

Ask AIView as Markdown
Copy a prompt to ask an AI assistant about this page.

Siemens Industrial Experience supports theming for all of its components. Everyone can use the embedded Community light and Community dark themes. You can also create themes to customize the design system for your own brand. Siemens AG applications should utilize the exclusive Siemens AG Corporate Brand Theme.

Siemens AG Corporate Brand Theme​

info

The Siemens AG Corporate Brand Theme is exclusively available for official Siemens AG products, where it should always be used as the default theme to reflect the latest Siemens AG Corporate Brand guidelines.

Siemens AG employees can access the Corporate Brand Theme at https://code.siemens.com/siemens-ix/ix-brand-theme.

How to set a theme​

To choose a theme set the data-ix-theme attribute of the <html> tag to the theme of choice (e.g. community) and the corresponding data-ix-color-schema attribute to the value light, dark or system to set the color scheme. system will automatically apply the color scheme of the users’ operating system.

<html data-ix-theme="community" data-ix-color-schema="dark">
<!-- Framework related imports -->
<!-- -->
<body></body>
</html>

The default stylesheet combines the component foundation and common utilities with the Community light and dark themes:

import '@siemens/ix/css/default.css';

Foundation applies the SiemensSans Pro font stack to [data-ix-theme] and sets body typography, text color, background and document-wide scrollbar styles. The default stylesheet also includes utilities for button groups, links, table classes and typography. It does not include a reset, body margin reset, the complete utility layer or legacy native form styles.

Global styles​

Components are self-contained and work with the default stylesheet alone. Add global styles only when your application needs them, for example a browser reset, the complete utility layer, themed scrollbars or legacy native form styles during migration:

import '@siemens/ix/css/default.css';
import '@siemens/ix/css/globals.css';

See Global styles for all entry points, their global effects, the recommended import order and migration guidance.

Loading foundation and themes separately​

Import the foundation and theme files separately when you provide a custom theme or only need selected Community (previously Classic) color schemas:

import '@siemens/ix/css/foundation.css';
import '@siemens/ix/css/theme/community-light.css';
import '@siemens/ix/css/theme/community-dark.css';

The Sass entry points provide the foundation and Community themes separately:

@use '@siemens/ix/scss/foundation';
@use '@siemens/ix/scss/theme/community';

Add @siemens/ix/scss/utilities when this custom composition also needs the utility layer.

Use the light or dark Sass theme entry point when you only need one color schema:

@use '@siemens/ix/scss/theme/community/light';
// or
@use '@siemens/ix/scss/theme/community/dark';

System tokens are available through a stable Sass entry point:

@use '@siemens/ix/scss/tokens/system' as system;

.my-element {
color: system.$si-sys-text-primary;
}

Use @siemens/ix/scss/tokens/legacy only when application styles still depend on legacy Sass constants. The previous @siemens/ix/scss/misc/common-variables path remains available during the Version 6 migration period for generated corporate themes. Other deep misc/* imports are not public API.

Deep internal partials are not public API. Use the documented Sass entry points or the supported mixins below @siemens/ix/scss/mixins/* instead.

Working with themes during runtime​