Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
material-components-web
Advanced tools
Modular and customizable Material Design UI components for the web
This package contains the master library for Material Components Web. It simply wraps all of its sibling packages up into one comprehensive library for convenience.
npm install material-components-web
@use "material-components-web/material-components-web";
import * as mdc from 'material-components-web';
const checkbox = new mdc.checkbox.MDCCheckbox(document.querySelector('.mdc-checkbox'));
// OR
import {checkbox} from 'material-components-web';
const checkbox = new checkbox.MDCCheckbox(document.querySelector('.mdc-checkbox'));
See Importing the JS component for more information on how to import JavaScript.
NOTE: Since switch is a reserved word in JS, switch is instead named
switchControl
.
NOTE: Built CSS files as well as UMD JS bundles will be available as part of the package.
The material-components-web
package automatically registers all MDC Web components with
mdc-auto-init, making it dead simple to create and initialize components
with zero configuration or manual work.
For example, say you want to use an icon button toggle. Simply render the necessary
DOM, and attach the data-mdc-auto-init="MDCIconButtonToggle"
attribute.
<button class="mdc-icon-button"
aria-label="Add to favorites"
aria-pressed="false"
data-mdc-auto-init="MDCIconButtonToggle">
<i class="material-icons mdc-icon-button__icon mdc-icon-button__icon--on">favorite</i>
<i class="material-icons mdc-icon-button__icon">favorite_border</i>
</button>
Then at the bottom of your html, insert this one-line script tag:
<script>mdc.autoInit()</script>
This will automatically initialize the icon button toggle, as well as any other components marked with the auto init data attribute. See mdc-auto-init for more info.
14.0.0 (2022-04-27)
unset
is unsupported in IE. (f460e23)validateTooltipWithCaretDistances
method. (3e30054)theme-styles
mixin... the value being retreived from the $theme
map and css property name was swapped. The mixin would request font-size
/font-weight
/letter-spacing
from the $theme
map (which expects size
/weight
/tracking
)... so these values would always be null
. (32b3913)attachTo
. (05db65e)showTimeout
is not set (indicating that this tooltip is about to be re-shown). (6ca8b8f)minRange
param to range sliders to request a minimum gap between the two thumbs. (8fffcb5)valueToAriaValueTextFn
and valueToValueIndicatorTextFn
functions are called for. (b6510c8)PiperOrigin-RevId: 444830518
PiperOrigin-RevId: 419837612
FAQs
Modular and customizable Material Design UI components for the web
The npm package material-components-web receives a total of 34,794 weekly downloads. As such, material-components-web popularity was classified as popular.
We found that material-components-web demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.