Skip to main content
Default Gray Amethyst
Version 4.0 released

Modes UI

Streamline your development process and ensure consistent, high-quality user interfaces across all your projects.

Get started

Quick start

To import the library via local installation (note that you will need access rights as the package is private) simply run either:

# GitHub installation (recommended)
npm install @metsooutotec/modes-web-components

Now you have access to all of Modes UI’s components!

To add a button simply do:

Click me
<mo-button>Click me</mo-button>

Modes

Modes UI is just one part of the larger ecosystem that is Modes (Metso design system). This quick introductory video will demonstrate what Modes has to offer, and how Modes UI fits in to the bigger picture.

Below is a list of some resources that can help you with adopting the Metso design system and contributing to it.

Resource
Description
Github logo.

Modes UI has been migrated to GitHub, where all the version control, issues, pull requests, packages, etc., are handled now.
Zeroheight logo. The Metso design system zeroheight website has more comprehensive documentation and more designer tools and guidelines.
Storybook logo. The storybook documentation page for the components of the original React component library (DSUI) showcases various usage examples and React specific syntax.
Azure DevOps logo. Modes UI and DSUI both used to be maintained on Azure DevOps. You can still find the legacy package and PR history there.
Figma logo.

Figma

Figma contains all the design files related to Metso design system and some additional tools.

New to Web Components?

Web components logo.
TL;DR Web Components are a way to create our own HTML elements (Custom Elements) and use them in any framework we want. Read the section on React integration for further instructions on React usage.

Thanks to the popularity of frameworks such as Angular, Vue, and React, component-driven development has become a part of our every day lives. Components help us encapsulate styles and behaviors into reusable building blocks. They make a lot of sense in terms of design, development, and testing.

Unfortunately, framework-specific (React in our case) components fail us in a number of ways:

  • You can only use them in the framework they’re designed for
  • Their lifespan is limited to that of the framework’s
  • New frameworks/versions can lead to breaking changes, requiring substantial effort to update components

Web Components solve these problems. They’re supported by all modern browsers, they’re framework-agnostic, and they’re part of the standard, so we know they’ll be supported for many years to come.

Browser support

Modes UI has been tested in the latest two versions of Chrome, Edge, Safari, and Firefox.

As mentioned above, Custom Elements are supported by all modern browsers:

Browser Versions
Chrome Google Chrome
Partial support*: v. 54–66 (Oct 12, 2016 - Apr 18, 2018)
Full support: v. 67 -> (May 29, 2018 -)
Edge Microsoft Edge
Full support: v. 79 -> (Jan 15, 2020 -)
Firefox Mozilla Firefox
Full support: v. 63 - (Oct 23, 2018 -)
Safari MacOS Safari
Partial support*: v. 10.1- (Mar 27, 2017 - )

Critical bug fixes in earlier versions will be addressed based on their severity and impact.

If you need to support IE11 or pre-Chromium Edge, this library isn’t for you. Although web components can (to some degree) be polyfilled for legacy browsers, supporting them is outside the scope of this project. If you need to provide components for users that need these browsers, you should look into an alternative.

Attribution

A huge thanks to Cory LaViska for creating Shoelace, which functions as the base for this project

Important project dependencies: