Scania theme is a package to style Scania looks and feel in the Corporate UI 4.0 setup.
NPM package
Install scania-theme package by running the command below.
npm i scania-theme
Import theme in the project and use it with addTheme function from corporate-ui.
import { defineCustomElements, addTheme } from 'corporate-ui';
import { theme as scania } from 'scania-theme';
defineCustomElements();
addTheme(scania);
CDN link
Add link to the script by adding the following to the head element. Make sure to include scania-theme script BEFORE the corporate-ui script.
<script src="https://static.scania.com/build/global/themes/scania/1.x/scania-theme.js"></script>
<script src="https://static.scania.com/build/global/4.x/corporate-ui.js"></script>
Replace x
with available releases.
Initialize the theme with the c-theme
component. Set global
attribute to true in order to enable bootstrap styling.
<c-theme name="scania" global="true"></c-theme>
- Clone scania-theme repository
git clone https://github.com/scania/scania-theme.git
- Download and install node.js: https://nodejs.org/en/
- If you're behind a firewall, CONFIGURE THE PROXY
- From the scania-theme folder, run
npm i
to install package dependencies - Start the local setup by running
npm start
- Scania theme scripts will be served on http://localhost:1338/scania-theme.js
The Scania brand identity and the interaction patterns found in this repository are not available on an open source basis. Although we have great freedom to make improvements and new components, some changes to interaction patterns and use of colours etc may not be approved.