0.0.2 • Published 5 years ago
epiresponsivepicture-react v0.0.2
epiresponsivepicture-react
ResponsivePicture React component for Forte.EpiResponsivePicture package
Install
npm install --save epiresponsivepicture-reactUsage
import React, { Component } from 'react'
import ResponsivePicture from 'epiresponsivepicture-react'
import 'epiresponsivepicture-react/dist/index.css'
model: ResponsiveImageViewModel;
profile: PictureProfile;
imgAttributes?: any
class Example extends Component {
render() {
return <ResponsivePicture model={imageModel} profile={pictureProfile} />
}
}Parameters
ResponsivePicture component accepts numerous parameters:
model(required), having following properties:url- base URL of the image,focalPoint- focal point of the image, withxandyproperties. Each property should be number in range of 0..1widthandheightof the original image,altfor the<img>tag,
profile(required), being serialized picture profile (camel cased)imgAttributes- set of additional HTML attributes that should be present in<img>tag.
License
MIT © Forte Digital