Hi everyone,
I’m using Material web components in my Chrome extension, but I’m having trouble customizing them. More precisely, when I click the switch component a ripple effect appears around it and stays there as long as the element is focussed.
The relevant portions of my html look like this:
<link rel="stylesheet" href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css">
...
<div class="mdc-switch">
<div class="mdc-switch__track"></div>
<div class="mdc-switch__thumb-underlay">
<div class="mdc-switch__thumb"></div>
<input type="checkbox" id="basic-switch" class="mdc-switch__native-control" role="switch"
aria-checked="false">
</div>
</div>
...
And to enable functionality, I included the following in a javascript file:
import {MDCSwitch} from '@material/switch';
const switchControl = new MDCSwitch(document.querySelector('.mdc-switch'));
Here’s what it looks like:
This behavior appears with Material buttons as well. Any ideas on how I might disable this focus highlight?
All the code is on GitHub. I appreciate any tips.