Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@spectrum-web-components/underlay
Advanced tools
An `<sp-underlay>` is used primarily in concert with elements similar to `<sp-dialog>` that lay over the rest of your page to deliver a blocking layer between those two contexts. See this element in action as part of the [`<sp-dialog-wrapper>` element](co
An <sp-underlay>
is used primarily in concert with elements similar to <sp-dialog>
that lay over the rest of your page to deliver a blocking layer between those two contexts. See this element in action as part of the <sp-dialog-wrapper>
element.
yarn add @spectrum-web-components/underlay
Import the side effectful registration of <sp-underlay>
via:
import '@spectrum-web-components/underlay/sp-underlay.js';
When looking to leverage the Underlay
base class as a type and/or for extension purposes, do so via:
import { Underlay } from '@spectrum-web-components/underlay';
When leveraging an <sp-underlay>
in conjunction with overlay content, place it as a sibling prior to your overlay content.
<style>
sp-underlay:not([open]) + sp-dialog {
display: none;
}
sp-underlay + sp-dialog {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1;
background: var(--spectrum-gray-100);
}
</style>
<sp-button
onclick="
console.log(this.nextElementSibling);
this.nextElementSibling.open = true;
"
>
Open dialog with underlay element
</sp-button>
<sp-underlay></sp-underlay>
<sp-dialog size="s">
<h1 slot="heading">Hello, I'm an overlay!</h1>
<p>Enjoy your day...</p>
<sp-button
slot="button"
onclick="
this.parentElement.previousElementSibling.open = false;
"
>
Close
</sp-button>
</sp-dialog>
FAQs
An `<sp-underlay>` is used primarily in concert with elements similar to `<sp-dialog>` that lay over the rest of your page to deliver a blocking layer between those two contexts. See this element in action as part of the [`<sp-dialog-wrapper>` element](co
The npm package @spectrum-web-components/underlay receives a total of 2,292 weekly downloads. As such, @spectrum-web-components/underlay popularity was classified as popular.
We found that @spectrum-web-components/underlay demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 13 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 found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.