Security News
npm Updates Search Experience with New Objective Sorting Options
npm has a revamped search experience with new, more transparent sorting options—Relevance, Downloads, Dependents, and Publish Date.
@spectrum-web-components/asset
Advanced tools
Use an `<sp-asset>` element to visually represent a file, folder or image in your application. File and folder representations will center themselves horizontally and vertically in the space provided to the element. Images will be contained to the element
Use an <sp-asset>
element to visually represent a file, folder or image in your application. File and folder representations will center themselves horizontally and vertically in the space provided to the element. Images will be contained to the element, growing to the element's full height while centering itself within the width provided.
yarn add @spectrum-web-components/asset
Import the side effectful registration of <sp-asset>
via:
import '@spectrum-web-components/asset/sp-asset.js';
When looking to leverage the Asset
base class as a type and/or for extension purposes, do so via:
import { Asset } from '@spectrum-web-components/asset';
<sp-asset style="height: 128px">
<img src="https://place.dog/500/500" alt="Demo Image" />
</sp-asset>
<div class="flex">
<sp-asset variant="file"></sp-asset>
<sp-asset variant="file" label="Named File Asset"></sp-asset>
</div>
<div class="flex">
<sp-asset variant="folder"></sp-asset>
<sp-asset variant="folder" label="Named Folder Asset"></sp-asset>
</div>
FAQs
Use an `<sp-asset>` element to visually represent a file, folder or image in your application. File and folder representations will center themselves horizontally and vertically in the space provided to the element. Images will be contained to the element
We found that @spectrum-web-components/asset demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
npm has a revamped search experience with new, more transparent sorting options—Relevance, Downloads, Dependents, and Publish Date.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.