npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

material-web-components-react

v0.3.16

Published

[![npm version](https://badge.fury.io/js/material-web-components-react.svg)](https://www.npmjs.com/package/material-web-components-react) ![release](https://img.shields.io/badge/release-beta-blue) [![docs](https://img.shields.io/badge/read%20the%20docs-8A

Downloads

639

Readme

Material Web Components for React

npm version release docs docs

A thin React wrapper over @material/web. Aims to be a locally-installable, accessible and customizable Material standard for React. Recommended to use with MUI. Free. Open Source. Looking for maintainers.

hero

Installation

To use Material Web Components for React as a library in your project, run:

npm install material-web-components-react

Usage

Here's a general example of how the components can be used:

import React from 'react';
import Button from 'material-web-components-react/button';

function Example() {
  return (
    <div>
      <Button>Click me</Button>
    </div>
  );
}

For a detailed reference on usage, you might want to check out the source code of the NextJS demo. It's simple!

Under the hood, this library simply uses the official @material/web components. Visit the official Material Web Components docs to learn how to use those components. The props remain the same!

Contributing

We're looking for maintainers and contributors!

Roadmap 🚀

  • [ ] Make sure all native Web Components are properly working
    • [x] Demo all components
    • [x] Add all missing events
    • [ ] [Need help] Add theming (design tokens) through Tailwind (i.e. remove all ts-ignores) (https://github.com/grayhatdevelopers/material-web-components-react/pull/2)
  • [x] Resolve SSR/SSG issues, make compatible with NextJS (i.e. remove all dynamic imports)
  • [x] Separate the demo from the actual UI code
  • [x] Make installable as a package.
  • [ ] [Need help] Make installable as code-in-project, like shadcn/ui, so developers have more control (https://github.com/grayhatdevelopers/material-web-components-react/pull/11)
  • [ ] [Need help] Add better TypeScript support (https://github.com/grayhatdevelopers/material-web-components-react/issues/12)
  • [ ] Sync with upstream (i.e. https://github.com/material-components/material-web/blob/main/docs/intro.md) through webhooks and automations
    • [ ] Use Copybara (or good ol' GitHub webhooks) to automate syncing with upstream
    • [ ] Use lit-analyzer to see which Web Components changed. Perhaps mix with an LLM to compare existing and newly autogenerated code.
    • [ ] Create a PR with the new Component code.
  • [ ] Mix this library with Tailwind and BaseUI in order to complete missing Components which may prove useful for building production applications
    • [x] App Bars
      • [x] Top App Bar
      • [x] Bottom App Bar
    • [x] Stack
    • [x] Box
    • [x] Navigation Rail
    • [x] Container
    • [x] Typography

Credits

Huge shout out to Elizabeth Mitchell (asyncLiz) and the rest of the Material Design team for their awesome Web Components implementation.

Thank you Travis Reeder for your Web Component implementation of Navigation Rail. I had to copy it to this project. I couldn't use yours directly because it would import @material/web again and bring conflicts.

Thanks for making the crappy, brain-dead wrapper components:

Thanks for improving the demo:

Thanks for building BottomSheet and Snackbar: