Giter Site home page Giter Site logo

wkich / itwinui-react Goto Github PK

View Code? Open in Web Editor NEW

This project forked from itwin/itwinui-react

0.0 1.0 0.0 8.89 MB

A react implementation of our iTwinUI UX standards.

Home Page: https://itwin.github.io/iTwinUI-react/

License: MIT License

JavaScript 3.04% HTML 0.01% TypeScript 96.95%

itwinui-react's Introduction

iTwinUI logo

iTwinUI-react

itwinui-react on npm Build status

What is iTwinUI-react?

iTwinUI-react is a library built on top of the iTwinUI library. The goal of this project is to provide React components for using the styles and components from the core iTwinUI project. Check out the demo website to see the components in action.


Installation

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

Usage

Import the component you want and start using it!

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

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

Yes, that's really all you need as you can see in this live interactive demo:

Edit Button


Theming

By default, all components use the light theme but we also provide support for switching to dark theme in two different ways:

  • Use ThemeProvider in your root component where you can pass one of the following values:
    • light (default)
    • dark
    • os (which respects the color scheme of the operating system)
import { ThemeProvider } from '@itwin/itwinui-react';

const App = () => (
  <>
    <ThemeProvider theme='dark' />
    // Your code goes here.
  </>
);
  • The useTheme hook also provides the same functionality as ThemeProvider.
import { useTheme } from '@itwin/itwinui-react';

const App = () => {
  useTheme('dark');
  return (
    <>
      // Your code goes here.
    </>
  );
};

Note: You only need to use one of these methods, and it only needs to be done once.


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.

itwinui-react's People

Contributors

mayank99 avatar veekeys avatar bentleyvk avatar raplemie avatar juliakas avatar juliusrupsys avatar basanta078 avatar aruniverse avatar maxime4000 avatar bsteinbk avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.