Skip to content

Latest commit

 

History

History
88 lines (61 loc) · 2.94 KB

README.md

File metadata and controls

88 lines (61 loc) · 2.94 KB

iTwinUI logo

An open-source design system that helps us build a unified web experience.

itwinui-css on npm Build status Dependencies Status

iTwinUI is a design system for building beautiful and well working web UI components within Bentley Systems & iTwin.js applications. It supports light and dark color schemes and also comes with high contrast versions of both.

iTwinUI-css consists of the following packages:

  • @itwin/itwinui-css - the CSS for every component as well as some global styles
  • @itwin/itwinui-variables - CSS variables for iTwinUI's design tokens

If you're looking for React components, check out @itwin/itwinui-react which is built on top of iTwinUI-css.


Installation

Install both packages:

npm add @itwin/itwinui-css @itwin/itwinui-variables

Usage

Import both packages (only needs to be done once per page):

@import '@itwin/itwinui-variables';
@import '@itwin/itwinui-css';

Note: If your project doesn't support export maps, then you might need to import the css from the real paths:

@import '@itwin/itwinui-variables/index.css';
@import '@itwin/itwinui-css/css/all.css';

Apply the iui-root class at the root of your app, and use data-iui-theme to specify theme (light or dark). See @itwin/itwinui-variables/README.md for more details on theming.

<body class="iui-root" data-iui-theme="light">
  <!-- your application code -->
</body>

Now you can start using our components:

<button class="iui-button" data-iui-variant="default">
  <span>Hello world</span>
</button>

Check out our demo website for a preview of all our components.


Contributing

Are you interested in helping iTwinUI grow and expand? You can submit feature requests or bugs by creating issues. Please read our CONTRIBUTING.md for more information.

Changelog

Read our CHANGELOG.md to find recent changes.