1.0.2 • Published 5 years ago

@fenderdigital/react-image v1.0.2

Weekly downloads
1
License
UNLICENSED
Repository
-
Last release
5 years ago

Image for Fender React UI Kit

Description

Progressive image loader

Installation and Usage

yarn add @fenderdigital/react-image --save
import Image from '@fenderdigital/react-image';

Props

  • alt - Descriptive string of the image contents for accessibility
  • bgColor - Tachyon class (without bg- prefix) for image container background color
  • images - Array of image URLs
  • intersectionOptions - Object containing propters for the intersection observer
  • onLoaded - Callback to run after the higher fidelity image has loaded
  • ratio - Aspect ratio of the image
  • tiny - URL of a small version of the image
  • transition - CSS animation transition type
propNamepropTypedefaultValueisRequired
altstring''false
bgColorstring'near-white'false
imagesarray[]false
intersectionOptionsobject{ root: null, rootMargin: '0px', threshold: 0.5 }false
onLoadedfunction() => {}false
rationumber9 / 16false
tinystringnullfalse
transitionstringnullfalse

Development

Check the Monorepo README for development documentation.