material-components-web | Modular and customizable Material Design UI components | User Interface library

 by   material-components TypeScript Version: 14.0.0 License: MIT

kandi X-RAY | material-components-web Summary

kandi X-RAY | material-components-web Summary

material-components-web is a TypeScript library typically used in User Interface, React, Framework applications. material-components-web has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Material Components for the web helps developers execute Material Design. Developed by a core team of engineers and UX designers at Google, these components enable a reliable development workflow to build beautiful and functional web projects. Material Web strives to seamlessly incorporate into a wider range of usage contexts, from simple static websites to complex, JavaScript-heavy applications to hybrid client/server rendering systems. In short, whether you're already heavily invested in another framework or not, it should be easy to incorporate Material Components into your site in a lightweight, idiomatic fashion. Material Components for the web is the successor to Material Design Lite. In addition to implementing the Material Design guidelines, it provides more flexible theming customization, not only in terms of color, but also typography, shape, states, and more. It is also specifically architected for adaptability to various major web frameworks. NOTE: Material Components Web tends to release breaking changes on a monthly basis, but follows semver so you can control when you incorporate them. We typically follow a 2-week release schedule which includes one major release per month with breaking changes, and intermediate patch releases with bug fixes.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              material-components-web has a medium active ecosystem.
              It has 16834 star(s) with 2235 fork(s). There are 388 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 393 open issues and 2519 have been closed. On average issues are closed in 189 days. There are 89 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of material-components-web is 14.0.0

            kandi-Quality Quality

              material-components-web has 0 bugs and 0 code smells.

            kandi-Security Security

              material-components-web has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              material-components-web code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              material-components-web is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              material-components-web releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              It has 28674 lines of code, 0 functions and 979 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of material-components-web
            Get all kandi verified functions for this library.

            material-components-web Key Features

            No Key Features are available at this moment for material-components-web.

            material-components-web Examples and Code Snippets

            Material Components with Laravel
            Lines of Code : 14dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm i
            npm i node-sass sass-loader -D
            npm i material-components-web -S
            
            const mix = require('laravel-mix')
            
            mix
            .js('resources/assets/js/app.js', 'public/js')
            .sass('resources/assets/sass/app.scss', 'public/css', {
             

            Community Discussions

            QUESTION

            Should Material Design web applications use @import or @use?
            Asked 2022-Jan-11 at 12:23

            Looking at the Material Components Web documentation, I see inter alia @use "material/chips/styles"

            When I visit app.scss – adopt-a-pup I see @import statements such as @import "@material/chips/mdc-chips";

            I understand that @use is the newer modular way. Which sass approach should I use?

            Could the glitch demos be out of date? Is there an example reference anywhere that makes use of both, say, mdc-chips and mdc-select?

            ...

            ANSWER

            Answered 2022-Jan-11 at 12:23

            You definitely should use @use. adopt-a-pup is very outdated. It references MDC 0.41.0, while current version is 13.0.0.

            Unfortunately MDC examples are very scarce and documentation at material.io is outdated sometimes. I recommend using docs on their github repo, it is the most current.

            Also some time ago I put together these two starter kits. They might be of some help in terms of examples how to use MDC:

            1. Material Design Layout Kit for Angular
            2. Basic Material Starter Kit

            Source https://stackoverflow.com/questions/70657692

            QUESTION

            Use Virtual Scroll in image gallery
            Asked 2022-Jan-11 at 12:19

            I'm trying to implement a virtual scroll in my image gallery. My problem is that the implementation doesn't work correctly. First, the elements are displayed in vertical position, when in fact they should respect the horizontal breakpoints and only then respect the vertical scroll. Second, with the scroll elements appear with huge spacing.

            Does anyone know how I can solve this problem? thanks

            DEMO

            HTML

            ...

            ANSWER

            Answered 2022-Jan-11 at 12:19

            I updated your example here.

            Your problem was mainly css and there seem to have been (at least) 2 problems:

            1. Your are giving .mdc-image-list__item class min-height: 400px and max-height: 400px. That basically means that all your .mdc-image-list__item containers will have 400px height (so height: auto is kind of useless). Removing this will remove the white space between your images.

            2. If you want to have scroll as well as elements on the same page you should use a flex container with flex-wrap: wrap.

            In order to do this I used the following snippet (for your case):

            Source https://stackoverflow.com/questions/70654911

            QUESTION

            Vanilla Javascript Material Components Web have missing Css attributes
            Asked 2022-Jan-04 at 18:07

            I am testing Material Components Web from their recommended CDN & some minimal simple custom Vanilla Javascript to get it work properly.

            For example, I can follow the single line list example showed here like this:

            ...

            ANSWER

            Answered 2022-Jan-04 at 18:07

            First of all, I'd recommend using docs on github repo - https://github.com/material-components/material-components-web/tree/master/packages/mdc-list:

            List is currently being updated to better match the Material spec. As a result, there are two versions of List available: the deprecated old version and the new, future-proof version.

            ... there are differences in class names and DOM structure: the old version uses class names with a mdc-deprecated-list prefix (e.g., mdc-deprecated-list-item) whereas the new version uses the typical mdc-list prefix (e.g., mdc-list-item).

            The example you referenced is related to deprecated version. You either need to add deprecated to class names, or update it according to the new docs.

            Here is updated code which uses the new List version:

            Source https://stackoverflow.com/questions/70543608

            QUESTION

            React Button - Material Components for Web - Secondary Styling with SASS
            Asked 2021-Aug-09 at 13:08

            I'm creating a React Button component using Material Components Web. I've gotten the default button working which uses the Primary theme colour. I'd like to add an option for a secondary coloured button, but I'm not sure how to do this with the sass mixins.

            I found this feature request but the answer is out of date as the Button styles have been refactored. Can someone point me in the right direction?

            Here's my Button implementation:

            Button.js

            ...

            ANSWER

            Answered 2021-Aug-09 at 13:08
            @use './theme';
            @use "~@material/button/mdc-button";       // This line injects button's core styles
            @use "~@material/button";                  // This line "imports" button's mixins
            
            .ids-button-secondary {
              @include button.filled-accessible(red);  // This mixin sets fill color for a contained button.
            }
            

            Source https://stackoverflow.com/questions/68659704

            QUESTION

            How do I import a Material Web Component in SvelteKit?
            Asked 2021-Jun-20 at 02:16

            I followed the standard tutorial in sveltkit to create a Typescript Project for a basic template.

            I wanted to use Material Web Component Button.

            I npm install @material/mwc-button.

            Then I simply add the following to routes/index.svelte

            ...

            ANSWER

            Answered 2021-Jun-20 at 02:16

            Wow, that error message is very unhelpful. In a non-TS SvelteKit project, you get Error when evaluating SSR module /node_modules/lit-html/lib/template-result.js: ReferenceError: window is not defined, which is a little clearer about what is going on.

            Importing Material Web Components runs code that uses window, which is not available on the server. Because of this, Vite throws an error while trying to process the imported mwc-button library. You can use a dynamic import in Svelte's onMount lifecycle function so that the library is only imported on the client. You will have to do this with any web component you import.

            Source https://stackoverflow.com/questions/68050948

            QUESTION

            Get index of each component in Svelte slot
            Asked 2021-Apr-27 at 13:34

            Is there a way to loop through all the children in a Svelte component?

            Goal

            I'm working on creating a list component in Svelte with this syntax (ideally).

            ...

            ANSWER

            Answered 2021-Apr-27 at 13:34

            I used a register function in the parent (your List component) for a pulldown menu component.

            Something like:

            List component:

            Source https://stackoverflow.com/questions/67276248

            QUESTION

            How to remove tags when input is focused
            Asked 2021-Mar-06 at 06:05

            i want to remove tags based on backspace keypress

            Input field is need to always focus on it, so i cannot remove input filed from container

            Question: i want to remove tag(s) based on each backspace keypress but focus will be always input element

            ...

            ANSWER

            Answered 2021-Mar-06 at 06:05

            This program hides the last tags when you type backspace:

            Source https://stackoverflow.com/questions/66502404

            QUESTION

            Toggle Material Design icon button on click
            Asked 2021-Feb-15 at 00:23

            I'm looking for a non-jQuery way of hiding & showing a Material Design icon button when toggling. Not sure if I should do it using innerHtml or something else. Let's say I'm trying to replicate jQuery's hide & show methods. Any help much is appreciated.

            ...

            ANSWER

            Answered 2021-Feb-14 at 16:12

            You can bind an event handler to toggle a class on the icons which switches which one is visible and which on is hidden like this:

            Source https://stackoverflow.com/questions/66197235

            QUESTION

            Why does the second input textfield in material component not working?
            Asked 2020-Dec-23 at 15:16

            I have used material component input in my website. I create two the same input. Here is all my code:

            ...

            ANSWER

            Answered 2020-Dec-23 at 15:16

            It seems that mdc.textField.MDCTextField.attachTo(document.querySelector('.mdc-text-field')); only applying to only one elament.

            So i modified the code to make two of the inputs to apply the script as shown below

            Source https://stackoverflow.com/questions/65426235

            QUESTION

            How to implement Multi - Select in Material Components for the web
            Asked 2020-Dec-01 at 02:42

            I am trying to implement material design Select Component with multiple selections from Material Components for the web. But I am unable to find any option for the same.

            Code for Select. [ Documentation ]

            ...

            ANSWER

            Answered 2020-Dec-01 at 02:42

            The documentation clearly states

            MDC Select provides Material Design single-option select menus, using the MDC menu

            You'll need to either:

            1. Use some other component.
            2. Change UI design. It seems that "multiple selections select" is not in Material Design guidelines. Google itself uses different approaches for situations where multiple values needs to be selected. Here are few examples which should give you an idea how to work around "multiple selections select":

            Gmail: assigning multiple labels.

            Gmail: multiple addressee

            Google Calendar: selecting multiple event guests

            Source https://stackoverflow.com/questions/63845044

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install material-components-web

            You can download it from GitHub.

            Support

            Getting Started GuideDemos (external site)Material on other frameworksExamples using Material WebContributingMaterial Design Guidelines (external site)Supported browsersAll ComponentsChangelog
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
            Maven
            Gradle
            CLONE
          • HTTPS

            https://github.com/material-components/material-components-web.git

          • CLI

            gh repo clone material-components/material-components-web

          • sshUrl

            git@github.com:material-components/material-components-web.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link