Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
Instantiating Multiple Material Design Components

Instantiating a single Material Design Component is straightforward. For example,

import { MDCRipple } from "@material/ripple";
const iconButtonRipple = new MDCRipple(document.querySelector(".mdc-icon-button"));
iconButtonRipple.unbounded = true;

When there are multiple components, MDC documentation recommends using querySelectorAll like this:

const iconButtonRipple = [].map.call(
    document.querySelectorAll(".mdc-icon-button"),
    function (el) {
        return new MDCRipple(el);
    }
);

However, the above instantiation does not work, and I don't know where to use the iconButtonRipple.unbounded = true line in this. The only workaround I have is to assign a special class to every icon button and instantiate it all one by one.

Can someone please help me instantiate this like the one mentioned in the documentation?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I would try running this:

const ripples = [...document.querySelectorAll(".mdc-icon-button")].map(el => {
  const ripple = new MDCRipple(el);
  ripple.unbounded = true;
});

or

const ripples = [...document.querySelectorAll(".mdc-icon-button")].map(el => new MDCRipple(el));
ripples.forEach(ripple => {
  ripple.unbounded = true;
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!