Skip to main content

React

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

React is a widely-used library for building user interfaces, particularly single-page applications. This section guides you through the steps to install and set up our design system within a React project, ensuring a seamless integration process.

React

Library installation​

Install @siemens/ix, @siemens/ix-react and @siemens/ix-icons using a package manager:

npm install @siemens/ix @siemens/ix-react @siemens/ix-icons

Apply theme​

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

The default stylesheet includes the Community theme, foundation and common utilities for button groups, links, table classes and typography. 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 does not include a reset, body margin reset, the complete utility layer or legacy native form styles. See Global styles for the optional entry points.

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>