1.0.0-beta.9 • Published 2 years ago

mdc-react v1.0.0-beta.9

Weekly downloads
106
License
MIT
Repository
-
Last release
2 years ago

MDC React

Material Components Web implemented in React.

Setup

Install the library using npm:

npm i mdc-react

If you plan on using the Sass files, you'll also need to install sass:

npm i -D sass

NOTE: MDC React (as well as MDC Web) uses the new Sass Module System. Unfortunately at this time the node-sass implementation does not support it. Please use the sass library.

Icons

To use Material Icons include them in your HTML:

<link href="https://fonts.googleapis.com/css2?family=Material+Icons" rel="stylesheet">

Symbols (NEW)

To use Material Symbols include them in your HTML:

<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" rel="stylesheet">

The above snippet includes the default configuration for each axis, with weight at 400, optical size at 48, grade at 0 and fill (also 0.)

To configure the symbols follow the developer guide.

Usage

JS

To use the components just import what you need from the library:

import { Button } from 'mdc-react';

const App = () => {
    return (
        <div>
            <Button>Click me!</Button>
        </div>
    );
};

Alternatively you can import only the components you need:

import Button from 'mdc-react/button';
import Typography from 'mdc-react/typography';

const App = () => {
    return (
        <div>
            <Typography>Hello world!</Typography>
            <Button>Click me!</Button>
        </div>
    );
};

Sass

You can use all the styles:

@use 'path-to-node_modules/mdc-react';

or only the ones you need:

@use 'path-to-node_modules/mdc-react/src/button';
@use 'path-to-node_modules/mdc-react/src/typography';
1.0.0-beta.9

2 years ago

1.0.0-beta.8

2 years ago

1.0.0-beta.6

2 years ago

1.0.0-beta.7

2 years ago

1.0.0-beta.3

3 years ago

1.0.0-beta.4

3 years ago

1.0.0-beta.5

2 years ago

1.0.0-beta.2

3 years ago

1.0.0-beta.0

3 years ago

1.0.0-beta.1

3 years ago

0.20.1

3 years ago

0.20.0

3 years ago

0.19.9

3 years ago

0.19.8

3 years ago

0.19.7

3 years ago

0.19.6

3 years ago

0.19.5

3 years ago

0.19.4

3 years ago

0.19.3

3 years ago

0.19.0

3 years ago

0.19.1

3 years ago

0.19.2

3 years ago

0.18.3

3 years ago

0.18.1

4 years ago

0.18.2

4 years ago

0.18.0

4 years ago

0.17.9

4 years ago

0.17.8

4 years ago

0.17.7

4 years ago

0.17.5

4 years ago

0.17.6

4 years ago

0.17.4

4 years ago

0.17.3

4 years ago

0.17.2

4 years ago

0.17.1

4 years ago

0.17.0

4 years ago

0.16.1

4 years ago

0.16.0

4 years ago

0.15.8

4 years ago

0.15.7

4 years ago

0.15.5

4 years ago

0.15.6

4 years ago

0.15.4

4 years ago

0.15.1

4 years ago

0.15.2

4 years ago

0.15.3

4 years ago

0.14.6

4 years ago

0.14.5

4 years ago

0.14.3

4 years ago

0.14.4

4 years ago

0.14.2

4 years ago

0.14.1

4 years ago

0.14.0

4 years ago

0.13.5

4 years ago

0.13.4

4 years ago

0.13.2

4 years ago

0.13.3

4 years ago

0.13.1

4 years ago

0.13.0

4 years ago

0.12.0

4 years ago

0.0.1

7 years ago