# Tesseract Web - React Common Common front-end components for Web using the [Tesseract design system](https://make.modal.sh/tesseract/design), written for [React](https://reactjs.org). Package: [](https://js.pack.modal.sh/-/web/detail/@tesseract-design/react-common) [](https://js.pack.modal.sh/-/web/detail/@tesseract-design/react-common#versions) Dependencies: [](https://github.com/facebook/react) [](https://github.com/styled-components/styled-components) [](https://github.com/microsoft/typescript) [](https://github.com/facebook/jest) [](https://github.com/rollup/rollup) ## Installation Since this package resides in the [Modal.sh JavaScript Package Registry](https://js.pack.modal.sh/), you may need to adjust configuration in your chosen package manager. With [Yarn](https://yarnpkg.com), add this to your `.yarnrc` file: ``` "@tesseract-design:registry" "https://js.pack.modal.sh/" ``` Then, install the package by running the following command: ```shell script yarn add @tesseract-design/react-common ``` ## Usage The package includes components as named exports. Simply import the components you need individually or use a namespace import, like so: ```jsx harmony import * as React from 'react' import ReactDOM from 'react-dom' import * as T from '@tesseract-design/react-common' const LoginForm = etcProps => ( <form {...etcProps} > <fieldset> <legend> Log In </legend> <div> <T.TextInput block label="Username" /> </div> <div> <T.TextInput block type="password" label="Password" /> </div> <div> <T.Button> Log In </T.Button> </div> </fieldset> </form> ) const mountNode = window.document.createElement('div') ReactDOM.render( <LoginForm />, mountNode, ) window.document.body.appendChild(mountNode) ``` Detailed usage guides can be found in the [Tesseract Design - React Common documentation](https://make.modal.sh/tesseract/web/react/common). ## TypeScript The package is written and tested using TypeScript. Thus, typings for consumption in TypeScript are bundled with the compiled source.