JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q39590F
  • License ISC

A ractive component with baked in features like lazy loading, placeholders, and basic art-direction

Package Exports

  • ractive-image

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 (ractive-image) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Under development. First planned stable release is 0.1.0.

ractive-image

What is this nonsense?

ractive-image is a Ractive component which sets out to grant a comfortable set of defaults not found in a traditional image tag. These comfortable defaults include:

  • Lazy loading
  • Placeholder images / boxes
  • Best-fit art-direction
  • srcset support (coming soon)

Installation

npm install ractive-image

Project Integration

Set up ractive-image like you would any other component.

Ractive.components[ "r-image" ] = require( "ractive-image" );

If not using modules, ractive-image will expose a RactiveImage global.

Basic Usage

<r-image
    id="imgProfAvatar"
    height="150px"
    width="150px"
    placeholder="/v1/me/avatar?s=sample"
    src="/v1/me/avatar?s=med" />