1.2.20 • Published 3 months ago

@independent-software/typeui v1.2.20

Weekly downloads
5
License
MIT
Repository
github
Last release
3 months ago

TypeUI

Bootstrap getting old hat? SemanticUI too heavy? Prefer React and TypeScript? TypeUI is a suite of UI components built in 100% TypeScript. It's light-weight, and it uses styled-components to allow you to serve everything as a single JavaScript file.

Installation

npm install @independent-software/typeui --save
yarn add @independent-software/typeui
bower install @independent-software/typeui --save

Documentation

Storybook available as GitHub pages.

Projects

You can see TypeUI in action on recharts.online.

Usage

This package has a built-in theme, which must be passed on to any controls your app uses. You can derive new themes from the default theme. The required imports are:

import * as React from 'react'
import * as ReactDOM from 'react-dom'
import { ThemeProvider } from 'styled-components'
import { Theme } from '@independent-software/typeui/styles/Theme'

This React app uses a single component Button:

import { Button } from '@independent-software/typeui/controls/Button'

ReactDOM.render(
  (<React.Fragment>
    <ThemeProvider theme={Theme}>
      <Button>Click me!</Button>
    </ThemeProvider>
  </React.Fragment>),
  document.getElementById('root')
); 

Optionally, you can use the component <StyleReset/> to perform a global CSS reset, if your app is not already doing this. In addition, <StyleBase> sets up some optional base styles:

import { StyleReset } from '@independent-software/typeui/styles/StyleReset'
import { StyleBase } from '@independent-software/typeui/styles/StyleBase'
import { Button } from '@independent-software/typeui/controls/Button'

ReactDOM.render(
  (<React.Fragment>
    <StyleReset/>
    <StyleBase/>
    <ThemeProvider theme={Theme}>
      <Button>Click me!</Button>
    </ThemeProvider>
  </React.Fragment>),
  document.getElementById('root')
);

This project was built in TypeScript and comes with TypeScript type definitions, so it's not necessary to install these separately.

Notes

Tree shaking

The ES2015 import statements in this package are structured in a way that promotes tree shaking in Webpack. If an application imports only a few components from this library, then (for production builds) Webpack will not include the unused components, which can greatly reduce the size of the application package.

This import statement will import just the Button component:

import { Button } from '@independent-software/typeui/controls/button'

For tree shaking to work, be sure to set the following in your Webpack config file:

optimization: {
  usedExports: true
}

as well as mode: 'production'.

1.2.18

3 months ago

1.2.19

3 months ago

1.2.20

3 months ago

1.2.17

3 months ago

1.2.16

3 months ago

1.2.14

3 months ago

1.2.15

3 months ago

1.2.12

3 months ago

1.2.13

3 months ago

1.2.11

3 months ago

1.2.8

4 months ago

1.2.7

4 months ago

1.2.6

4 months ago

1.2.5

4 months ago

1.2.4

4 months ago

1.2.10

4 months ago

1.2.9

4 months ago

1.2.3

4 months ago

1.2.2

4 months ago

1.2.0

4 months ago

1.2.1

4 months ago

1.1.45

5 months ago

1.1.44

5 months ago

1.1.41

9 months ago

1.1.40

9 months ago

1.1.43

7 months ago

1.1.42

8 months ago

1.1.29

1 year ago

1.1.28

1 year ago

1.1.30

1 year ago

1.1.34

1 year ago

1.1.33

1 year ago

1.1.32

1 year ago

1.1.38

1 year ago

1.1.37

1 year ago

1.1.36

1 year ago

1.1.35

1 year ago

1.1.39

1 year ago

1.1.23

1 year ago

1.1.22

1 year ago

1.1.21

1 year ago

1.1.27

1 year ago

1.1.26

1 year ago

1.1.25

1 year ago

1.1.24

1 year ago

1.1.12

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.19

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.20

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.26

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.32

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.23

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.9

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

0.0.96

3 years ago

0.0.97

3 years ago

0.0.98

3 years ago

0.0.99

3 years ago

0.0.95

3 years ago

0.0.94

3 years ago

0.0.93

3 years ago

0.0.91

3 years ago

0.0.92

3 years ago

0.0.90

3 years ago

0.0.89

3 years ago

0.0.88

3 years ago

0.0.87

4 years ago

0.0.86

4 years ago

0.0.85

4 years ago

0.0.84

4 years ago

0.0.83

4 years ago

0.0.81

4 years ago

0.0.82

4 years ago

0.0.80

4 years ago

0.0.79

4 years ago

0.0.77

4 years ago

0.0.78

4 years ago

0.0.74

4 years ago

0.0.75

4 years ago

0.0.76

4 years ago

0.0.73

4 years ago

0.0.72

4 years ago

0.0.71

4 years ago

0.0.70

4 years ago

0.0.69

4 years ago

0.0.68

4 years ago

0.0.67

4 years ago

0.0.66

4 years ago

0.0.64

4 years ago

0.0.65

4 years ago

0.0.63

4 years ago

0.0.62

4 years ago

0.0.61

4 years ago

0.0.60

4 years ago

0.0.59

4 years ago

0.0.58

4 years ago

0.0.57

4 years ago

0.0.56

4 years ago

0.0.55

4 years ago

0.0.54

4 years ago

0.0.53

4 years ago

0.0.52

4 years ago

0.0.51

4 years ago

0.0.50

4 years ago

0.0.48

4 years ago

0.0.49

4 years ago

0.0.47

4 years ago

0.0.46

4 years ago

0.0.45

4 years ago

0.0.44

4 years ago

0.0.40

4 years ago

0.0.41

4 years ago

0.0.42

4 years ago

0.0.43

4 years ago

0.0.38

4 years ago

0.0.39

4 years ago

0.0.37

4 years ago

0.0.36

4 years ago

0.0.35

5 years ago

0.0.34

5 years ago

0.0.33

5 years ago

0.0.32

5 years ago

0.0.31

5 years ago

0.0.30

5 years ago

0.0.29

5 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago