JSPM

@spectrum-web-components/asset

0.1.6-alpha.84+1680fb01
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14476
  • Score
    100M100P100Q144861F
  • License Apache-2.0

Package Exports

  • @spectrum-web-components/asset
  • @spectrum-web-components/asset/custom-elements.json
  • @spectrum-web-components/asset/package.json
  • @spectrum-web-components/asset/sp-asset
  • @spectrum-web-components/asset/sp-asset.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@spectrum-web-components/asset) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

See it on NPM! How big is this package in your project?

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>