Description
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.
Installation
npm install @spectrum-web-components/asset
# or
yarn add @spectrum-web-components/asset
Example
<sp-asset style="height: 128px">
<img src="https://placedog.net/500/500" alt="Demo Image" />
</sp-asset>
File
<sp-asset variant="file"></sp-asset>
Folder
<sp-asset variant="folder"></sp-asset>