epiresponsivepicture-react
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

epiresponsivepicture-react

ResponsivePicture React component for Forte.EpiResponsivePicture package

NPM JavaScript Style Guide

Install

npm install --save epiresponsivepicture-react

Usage

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, with x and y properties. Each property should be number in range of 0..1
    • width and height of the original image,
    • alt for 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

Readme

Keywords

none

Package Sidebar

Install

npm i epiresponsivepicture-react

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

48.2 kB

Total Files

14

Last publish

Collaborators

  • kpkozak