JSPM

@itwin/itwinui-react

3.0.0-dev.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 39457
  • Score
    100M100P100Q159022F
  • License MIT

A react component library for iTwinUI

Package Exports

  • @itwin/itwinui-react
  • @itwin/itwinui-react/cjs
  • @itwin/itwinui-react/cjs/core/utils
  • @itwin/itwinui-react/esm
  • @itwin/itwinui-react/esm/core/utils
  • @itwin/itwinui-react/styles.css

Readme

iTwinUI logo

iTwinUI-react

itwinui-react on npm Build status

What is iTwinUI-react?

iTwinUI-react is a React component library for iTwinUI. The goal of this package is to provide React components that make it easier to use the styles from @itwin/itwinui-css. Check out the demo website to see the components in action.


Installation

npm install @itwin/itwinui-react
yarn add @itwin/itwinui-react

Setup

Wrap your application entrypoint in ThemeProvider and import styles.css.

import { ThemeProvider } from '@itwin/itwinui-react';
import '@itwin/itwinui-react/styles.css';

export default function App() {
  return (
    <>
      <ThemeProvider>
        {/* Your components go here. */}
      </ThemeProvider>
    </>
  );
}

ThemeProvider has a theme prop which accepts one of the following values:

  • light (default)
  • dark
  • os (respects the color scheme of the operating system)
  • inherit

Usage

After setting up ThemeProvider and styles, import the component you want and start using it!

import { Button } from '@itwin/itwinui-react';

const Page = () => (
  <Button>Hello!</Button>
);

Check out this template for a live interactive demo:

Edit in CodeSandbox


FAQ

For a list of frequently asked questions, visit the wiki.


Contributing

We welcome you to contribute and make this UI design system better. You can submit feature requests or bugs by creating an issue. Please read our CONTRIBUTING.md for more information.


Changelog

Read our CHANGELOG.md to find recent changes.