@sandlada/material-design-css
Version:
A ready-made npm package for a collection of css styles in the material design style.
76 lines (52 loc) • 2.24 kB
Markdown
# /material-design-css




`/material-design-css` is a CSS npm package for Material Design, styles include:
- Color
- Palette
- Motion
- Shape
- Typography
## Installation
```plaintext
npm i /material-design-css
```
## Import
```typescript
// TypeScript File
// If you are using Vite or Webpack.
/**
* This will import all styles.
* Loading all styles will cause the style file to be too large, please load as needed.
*/
import '/material-design-css'
// Load preset, if using color
import '/material-design-css/preset'
// text-on-surface
import '/material-design-css/color/text-utilities.css'
// bg-surface
import '/material-design-css/color/bg-utilities.css'
// text-primary-0 (black)
import '/material-design-css/palette/text-utilities.css'
// bg-primary-100 (white)
import '/material-design-css/palette/bg-utilities.css'
// display-large
import '/material-design-css/typography.css'
// shape-medium
import '/material-design-css/shape.css'
// animation-easing-expressive-fast-spatial
import '/material-design-css/animation-utilities.css'
// transition-easing-expressive-fast-spatial
import '/material-design-css/transition-utilities.css'
```
## Usage
Copy this code into your configured project and you will see a button with color and rounded corners.
```html
<button class="shape-medium bg-primary text-on-primary">
A rounded button
</button>
```
## Documentation
For more information on how to use, please visit [the project's official website](https://material-design-css.sandlada.com)