@vcl/responsive-image

0.6.3 • Public • Published

VCL responsive-image

Let images fill up the available horizontal space of its container if it is at least as wide.

Features

The vclResponsiveImage just sets the max-width of the image to 100%.

The optional vclResponsiveImageContainer can be used to:

  • Show a message while loading.
  • Pre-occupy the space for an unloaded image re-flows and content jumping.
  • Show a fall back message.

Usage

Basic Example

basic example

Container Example

container example

Classes

  • vclResponsiveImage
  • vclResponsiveImageContainer

Modifiers

Variables

  • --responsive-image-container-color

Demo

example.html on GH-pages.

Package Sidebar

Install

npm i @vcl/responsive-image

Weekly Downloads

6

Version

0.6.3

License

MIT

Unpacked Size

5.72 kB

Total Files

9

Last publish

Collaborators

  • marcode95
  • vanthome
  • dani723
  • vilsol
  • jurgis-upenieks