Giter Site home page Giter Site logo

solarliner / preact-material-components Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prateekbh/preact-material-components

0.0 2.0 0.0 92.74 MB

preact wrapper for "Material Components for the web"

Home Page: https://material.preactjs.com

License: MIT License

JavaScript 6.43% Shell 1.50% TypeScript 92.07%

preact-material-components's Introduction

preact-material-components

Greenkeeper badge Dependencies badge build

preact components for material-components-web


These components bring material components in an a-la-carté fashion. You can use n number of components without taking the weight of any extra code of the components you do not use.

preact-material-components is a thin opinion-less wrapper over material-components-web. Use these for painless integration of these components into your project, without taking the bloat.

Smaller bundles FTW!!!

Which distribution to use

There are now three distributions:

Default Build

Location: Package Root / preact-material-components/<Component>

Who?

  • Libraries: ✖ (Users should decide about transpilation themselves)
  • Applications: ✔

Support:

This supports all browsers supported by mwc, JavaScript and TypeScript

ES Module Build

Location: esm directory / preact-material-components/esm/<Component>

Who?

  • Libraries: ✔
  • Applications: ✔

Support:

This supports most recent browsers, JavaScript and TypeScript

TypeScript Source

Location: ts directory / preact-material-components/ts/<Component>

Who?

  • Libraries: (✔) (Not recommended, keep in mind that your library will only support TypeScript)
  • Applications: ✔

Support:

Browser support depends on transpilation/TypeScript configuration and only TypeScript is supported.

FAQ

Error while using preact-material-components with less

If you are using less-loader you have to set strictMath: true option in your webpack config

{
	loader: 'less-loader',
	options: { strictMath: true }
}

Primary and Secondary props not working

To use theming props like primary/secondary, you'll need to include Theme's css

import 'preact-material-components/Theme/style.css';

Docs and Demos

https://material.preactjs.com/


P.S.: Let us know if you're using preact-material-components we would love to hear your experiences.

preact-material-components's People

Watchers

 avatar  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.