0.1.2 • Published 5 years ago

@volvo-cars/image-component v0.1.2

Weekly downloads
5
License
UNLICENSED
Repository
github
Last release
5 years ago

Image

An image component with with optiional lazy-loading, spinner, placeholder with aspect ratio, and background option as well as retina support.

Basic usage

<Image src="https://example.com/example.jpg" />

Props

PropsTypeDescriptionRequiredDefault
srcstringImage source url✔︎null
retinaSrcstringRetina image source urlnull
aspectRatioarray width, heightAspect ratio for placeholder shown before image has loadednull
displayAsBackgroundbooleanDisplay image as backgroundfalse
loaderstringSet if a loading indicator should be shown during load (for now only "spinner" is available)null
placeholderBackgroundstringCustom background color of the placeholdernull
onLoadfuncCallback fired when image finish loadingnull
extendobjectExtend styles of imagenull
extendContainerobjectExtend styles of image container elementnull
disableFaderbooleanDisable fade-in transition when image is loadedfalse
disableLoadingbooleanDisable lazy-loading and load image as usualfalse
errorTextstringMessage shown when loading image results in an errornull
fallbackQueryParameterstringQuery parameter to append to image url and retry on errornull
altstringnull
lazyloadbooleanfalse
0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago