New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

preact-material-components

Package Overview
Dependencies
Maintainers
3
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preact-material-components

preact wrapper for "Material Components for the web"

  • 1.6.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
604
increased by39.17%
Maintainers
3
Weekly downloads
 
Created
Source

preact-material-components

Greenkeeper badge Dependencies badge build

preact components for material-components-web


These components bring material components in an a-la-carte 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.

Keywords

FAQs

Package last updated on 18 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc