{"id":13601874,"url":"https://github.com/material-components/material-components-web-react","last_synced_at":"2025-09-22T13:30:43.087Z","repository":{"id":30165848,"uuid":"124129430","full_name":"material-components/material-components-web-react","owner":"material-components","description":"Material Components for React (MDC React)","archived":false,"fork":false,"pushed_at":"2024-12-11T00:25:56.000Z","size":7489,"stargazers_count":2019,"open_issues_count":224,"forks_count":226,"subscribers_count":63,"default_branch":"master","last_synced_at":"2025-01-13T13:50:35.876Z","etag":null,"topics":["material-components","react"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/material-components.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-06T19:42:24.000Z","updated_at":"2025-01-08T15:13:21.000Z","dependencies_parsed_at":"2023-02-18T03:00:36.814Z","dependency_job_id":"08591b6c-f76c-421b-9aeb-053b184a1090","html_url":"https://github.com/material-components/material-components-web-react","commit_stats":{"total_commits":449,"total_committers":61,"mean_commits":7.360655737704918,"dds":"0.47438752783964366","last_synced_commit":"7c90f62e4b7c57dad1bc5dc01e7cd5772eddbe28"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/material-components%2Fmaterial-components-web-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/material-components%2Fmaterial-components-web-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/material-components%2Fmaterial-components-web-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/material-components%2Fmaterial-components-web-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/material-components","download_url":"https://codeload.github.com/material-components/material-components-web-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233802415,"owners_count":18732535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["material-components","react"],"created_at":"2024-08-01T18:01:09.209Z","updated_at":"2025-09-22T13:30:42.993Z","avatar_url":"https://github.com/material-components.png","language":"TypeScript","readme":"[![Build Status](https://api.travis-ci.com/material-components/material-components-web-react.svg?branch=master)](https://travis-ci.com/material-components/material-components-web-react/)\n[![codecov](https://codecov.io/gh/material-components/material-components-web-react/branch/master/graph/badge.svg)](https://codecov.io/gh/material-components/material-components-web-react)\n[![Chat](https://img.shields.io/discord/259087343246508035.svg)](https://discord.gg/material-components)\n\n# Material Components for React (MDC React)\n\n\u003e NOTE: MDC-React is no longer under active development\n\n\u003e We created MDC-React in 2018 to implement the updated Material Design guidelines.  Since then, the open-source React community has embraced the new guidelines and created a number of excellent unofficial implementations. See [Material Design Components - Web Framework Wrappers](https://github.com/material-components/material-components-web/blob/master/docs/framework-wrappers.md) for a partial list.\n\n\u003e In order to increase our focus on implementing our core, framework-independent libraries ([MDC-Web](https://github.com/material-components/material-components-web) and [MWC](https://github.com/material-components/material-components-web-components)), we’re passing the Material+React baton back to the community. That means Material Design will no longer be updating and maintaining this repo. We recommend that you switch to another implementation and keep building beautiful, usable apps based on Material Design. Thanks for being part of the project!\n\nMDC React was an official implementation of Google's Material Design components for React. It is a wrapper library for [MDC Web](https://github.com/material-components/material-components-web). Please refer to our [MDC Web Catalog](https://material-components.github.io/material-components-web-catalog/#/) to play and interact with the Components.\n\n![mpmgq9h6b9x](https://user-images.githubusercontent.com/579873/44939654-d8fdfd80-ad3b-11e8-9b64-6244cb5e6886.png)\n\n## Components\n\nThe following is a list of the components that are ready to be used, with corresponding links to the [material.io](https://material.io/) design spec and [MDC Web code](https://github.com/material-components/material-components-web).\n\nComponent | Spec | MDC Web\n---- | ---- | ----\n[Button](./packages/button) | [Button Design Page](https://material.io/design/components/buttons.html) | [MDC Button](https://github.com/material-components/material-components-web/tree/master/packages/mdc-button)\n[Card](./packages/card) | [Card Design Page](https://material.io/design/components/cards.html) | [MDC Card](https://github.com/material-components/material-components-web/tree/master/packages/mdc-card)\n[Checkbox](./packages/checkbox) | [Checkbox Design Page](https://material.io/design/components/selection-controls.html#checkboxes) | [MDC Checkbox](https://github.com/material-components/material-components-web/tree/master/packages/mdc-checkbox)\n[Chips](./packages/chips) | [Chips Design Page](https://material.io/design/components/chips.html) | [MDC Chips](https://github.com/material-components/material-components-web/tree/master/packages/mdc-chips)\n[Dialog](./packages/dialog) | [Dialog Design Page](https://material.io/design/components/dialogs.html) | [MDC Dialog](https://github.com/material-components/material-components-web/tree/master/packages/mdc-dialog)\n[Drawer](./packages/drawer) | [Drawer Design Page](https://material.io/design/components/navigation-drawer.html) | [MDC Drawer](https://github.com/material-components/material-components-web/tree/master/packages/mdc-drawer)\n[Fab](./packages/fab) | [Fab Design Page](https://material.io/design/components/buttons-floating-action-button.html) | [MDC Fab](https://github.com/material-components/material-components-web/tree/master/packages/mdc-fab)\n[Floating Label](./packages/floating-label) | [Text Field Design Page](https://material.io/design/components/text-fields.html) | [MDC Floating Label](https://github.com/material-components/material-components-web/tree/master/packages/mdc-floating-label)\n[Icon Button](./packages/icon-button) | [Icon Button Design Page](https://material.io/design/components/buttons.html#toggle-button) | [MDC Icon Button](https://github.com/material-components/material-components-web/tree/latest-release/packages/mdc-icon-button)\n[Layout Grid](./packages/layout-grid) | [Layout Grid Design Page](https://material.io/design/layout/responsive-layout-grid.html#responsive-ui-grid) | [MDC Layout Grid](https://github.com/material-components/material-components-web/tree/latest-release/packages/mdc-layout-grid)\n[Line Ripple](./packages/line-ripple) | [Text Field Design Page](https://material.io/design/components/text-fields.html) | [MDC Line Ripple](https://github.com/material-components/material-components-web/tree/master/packages/mdc-line-ripple)\n[Linear Progress](./packages/linear-progress) | [Linear Progress Design Page](https://material.io/design/components/progress-indicators.html) | [MDC Linear Progress](https://github.com/material-components/material-components-web/tree/master/packages/mdc-linear-progress)\n[List](./packages/list) | [List Design Page](https://material.io/design/components/lists.html) | [MDC List](https://github.com/material-components/material-components-web/tree/latest-release/packages/mdc-list)\n[Material Icon](./packages/material-icon) | [Material Icon Design Page](https://material.io/design/iconography/system-icons.html#design-principles) | [Material Icon Tool](https://material.io/tools/icons/?style=baseline)\n[Menu Surface](./packages/menu-surface) | [Menu Surface Design Page](https://material.io/design/components/menus.html#design-principles) | [MDC Menu Surface](https://github.com/material-components/material-components-web/tree/master/packages/mdc-menu-surface)\n[Menu](./packages/menu) | [Menu Design Page](https://material.io/design/components/menus.html#design-principles) | [MDC Menu](https://github.com/material-components/material-components-web/tree/master/packages/mdc-menu)\n[Notched Outline](./packages/notched-outline) | [Text Field Design Page](https://material.io/design/components/text-fields.html) | [MDC Notched Outline](https://github.com/material-components/material-components-web/tree/master/packages/mdc-notched-outline)\n[Radio](./packages/radio) | [Radio Design Page](https://material.io/design/components/selection-controls.html#radio-buttons) | [MDC Radio](https://github.com/material-components/material-components-web/tree/master/packages/mdc-radio)\n[Ripple](./packages/ripple) | [Ripple Design Page](https://material.io/design/interaction/states.html) | [MDC Ripple](https://github.com/material-components/material-components-web/tree/master/packages/mdc-ripple)\n[Select](./packages/select) | [Select Design Page](https://material.io/design/components/menus.html#) | [MDC Select](https://github.com/material-components/material-components-web/tree/master/packages/mdc-select)\n[Snackbar](./packages/snackbar) | [Snackbar Design Page](https://material.io/design/components/snackbars.html) | [MDC Snackbar](https://github.com/material-components/material-components-web/tree/master/packages/mdc-snackbar)\n[Switch](./packages/switch) | [Switch Design Page](https://material.io/design/components/selection-controls.html#switches) | [MDC Switch](https://github.com/material-components/material-components-web/tree/master/packages/mdc-switch)\n[Tab](./packages/tab) | [Tabs Design Page](https://material.io/design/components/tabs.html) | [MDC Tab](https://github.com/material-components/material-components-web/tree/master/packages/mdc-tab)\n[Tab Bar](./packages/tab-bar) | [Tabs Design Page](https://material.io/design/components/tabs.html) | [MDC Tab Bar](https://github.com/material-components/material-components-web/tree/master/packages/mdc-tab-bar)\n[Tab Indicator](./packages/tab-indicator) | [Tabs Design Page](https://material.io/design/components/tabs.html) | [MDC Tab Indicator](https://github.com/material-components/material-components-web/tree/master/packages/mdc-tab-indicator)\n[Tab Scroller](./packages/tab-scroller) | [Tabs Design Page](https://material.io/design/components/tabs.html) | [MDC Tab Scroller](https://github.com/material-components/material-components-web/tree/master/packages/mdc-tab-scroller)\n[Text Field](./packages/text-field) | [Text Field Design Page](https://material.io/design/components/text-fields.html) | [MDC Text Field](https://github.com/material-components/material-components-web/tree/master/packages/mdc-textfield)\n[Top App Bar](./packages/top-app-bar) | [Top App Bar Design Page](https://material.io/design/components/app-bars-top.html) | [MDC Top App Bar](https://github.com/material-components/material-components-web/tree/master/packages/mdc-top-app-bar)\n[Typography](./packages/typography) | [Typography Design Page](https://material.io/design/typography/the-type-system.html#type-scale.html) | [MDC Typography](https://github.com/material-components/material-components-web/tree/master/packages/mdc-typography)\n\n## Getting Started\n\n### With StackBlitz\n\nIf you're looking to see how it looks without having to install a bunch of npm modules in your environment, please have a look at this [Starter Stackblitz](https://stackblitz.com/edit/react-eeyij6).\n\n### With create-react-app\n\n`create-react-app` is a popular CLI tool to getting started with React. If you're new to React or Webpack, you might be starting out here. This section will walk you through configuring `create-react-app` to install and use our components.\n\nIf you're using an older version (v1) of `create-react-app`, please refer to our [create-react-app-v1 doc](docs/create-react-app-v1.md).\n\n\u003e  Recommended things to know\n\n\u003e 1. node/npm\n\u003e 2. JavaScript\n\u003e 3. HTML/CSS\n\u003e 4. ES6\n\n\u003e _NOTE:_ If you haven't used `create-react-app` before, you may want to read the [Overview Guide](https://github.com/facebook/create-react-app#quick-overview).\n\n#### Step 1: Install create-react-app\n\n\u003e _NOTE:_ all npm commands can be replaced with yarn\n\nInstall `create-react-app`:\n\n```\nnpx create-react-app my-app\ncd my-app\nnpm start\n```\n\n##### Use with Typescript\n\nIt is recommended to use Typescript with our components. You will need to add a few more modules for this to work\"\n\n```\nnpm i @types/react @types/react-dom @types/classnames @types/node typescript\nnpm start\n```\n\n#### Step 2: Install Components\n\nInstall Button:\n\n```\nnpm install @material/react-button\n```\n\n#### Step 3: Using Sass\n\nIf you want to use the compiled CSS and not customize any colors, text, etc. you can skip to [Step 3a](#step-3a-use-compiled-css).\n\nMost likely you'll want to start using the [Sass mixins](https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md#sass) to customize your app. MDC Sass files are not supported out of the box, since we do not prepend `~` to our module imports. See this [Github issue](https://github.com/facebook/create-react-app/issues/4494#issuecomment-428531848) explaining the issue in detail. There is a workaround, but requires some work on your end (we promise it is not too difficult).\n\n##### Add environment variable\n\nTo get MDC React Components to work with `create-react-app` you need to set a `SASS_PATH` environment variable that points to your `node_modules` directory. To quickly do this on OS X or Linux enter the following in your command line:\n\n```sh\nexport SASS_PATH=./node_modules\n```\n\nIf you're on Windows use the following:\n\n```bat\nSET SASS_PATH=.\\node_modules\n```\n\nRename your `src/App.css` file to `src/App.scss`. You will also need to install `node-sass`:\n\n```sh\nnpm install node-sass\n```\n\nIf you permanently want to add this to your environment, read [adding environment variables](./docs/adding-env-variables.md). You're now ready to start using MDC React Sass modules in your `create-react-app`.\n\n\u003e _NOTE:_ this assumes that you will run `npm start` (or `yarn start`) from the root directory. By default this is how create-react-app is setup.\n\n```sass\n// ./src/App.scss\n\n@import \"@material/react-button/index.scss\";\n@import \"./react-button-overrides\";\n\n...\n```\n\n```sass\n// ./react-button-overrides.scss\n\n@import \"@material/button/mixins\";\n\n.button-alternate {\n  @include mdc-button-container-fill-color(lightblue);\n}\n\n```\n\n#### Step 3a: Use Compiled CSS\n\nIf you performed [Step 3](#step-3-using-sass), then you can skip to [Step 4](#step-4-use-mdc-react-button).\n\nIf you don't need to customize your app, then using the CSS is a quicker way to get started with MDC React Components. Each package comes with a `/dist` directory, which includes the CSS files compiled from our Sass files. `create-react-app` is ready to import CSS files. To import the Button CSS copy the following line into `./src/App.js` imports:\n\n```js\nimport '@material/react-button/dist/button.css';\n```\n\nIf you want to use the minified version, the import instead looks like:\n\n```js\nimport '@material/react-button/dist/button.min.css';\n```\n\n#### Step 4: Use MDC React Button\n\nOpen `./src/App.js`. Then replace the boilerplate App code (entire file) with the barebones MDC React Button:\n\n```js\nimport React, {Component} from 'react';\nimport Button from '@material/react-button';\n\nimport './App.scss';\n// add the appropriate line(s) in Step 3a if you are using compiled CSS instead.\n\nclass App extends Component {\n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cButton\n          raised\n          className='button-alternate'\n          onClick={() =\u003e console.log('clicked!')}\n        \u003e\n          Click Me!\n        \u003c/Button\u003e\n      \u003c/div\u003e\n    );\n  }\n}\n\nexport default App;\n```\n\nYou can also use these same configurations for your own Webpack build pipeline without `create-react-app`. But this is the quickest way to getting started with MDC React Components. Button is one of our simpler components, but you should be able to apply these same principles you learn here to any the components. Thanks for trying out MDC React Components, and remember to tell a friend! Enjoy!\n\n\n## Need help\n\nWe're constantly trying to improve our components. If Github Issues don't fit your needs, then please visit us on our [Discord Channel](https://discord.gg/material-components).\n","funding_links":[],"categories":["TypeScript","React","Material Components Web (MDC Web)"],"sub_categories":["Frameworks","MDC Web Framework Integrations"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaterial-components%2Fmaterial-components-web-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaterial-components%2Fmaterial-components-web-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaterial-components%2Fmaterial-components-web-react/lists"}