0.1.20 • Published 7 years ago

react-cdnvision v0.1.20

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
7 years ago

React CDN Vision

Resize, crop, and process images in the cloud, simply by changing their URLs.

NPM version

Install

npm install react-cdnvision

Support us

Star this project on GitHub.

Usage

Basic example

import { Component } from 'react';
import CDNVisionProvider, { Img } from 'react-cdnvision';

export default class Example extends Component {
  render() {
    return (
      <CDNVisionProvider name="your-name">
        <Img src="https://upload.wikimedia.org/wikipedia/commons/3/36/Cirrus_sky_panorama.jpg" alt="my image" width="200" />
      </CDNVisionProvider>
    );
  }
}

will render

<img src="http://image.cdnvision.com/your-name/https://upload.wikimedia.org/wikipedia/commons/3/36/Cirrus_sky_panorama.jpg?width=200" width="200" alt="my image" />

Cover example

import { Component } from 'react';
import CDNVisionProvider, { Cover } from 'react-cdnvision';

export default class Example extends Component {
  render() {
    return (
      <CDNVisionProvider name="your-name">
        <Cover src="https://upload.wikimedia.org/wikipedia/commons/3/36/Cirrus_sky_panorama.jpg" width="1600">
          <h1>This is text inside cover image</h1>
        </Cover>
      </CDNVisionProvider>
    );
  }
}

will render

<div style="background-size: cover; background-position: center;background-image: http://image.cdnvision.com/your-name/https://upload.wikimedia.org/wikipedia/commons/3/36/Cirrus_sky_panorama.jpg?width=1600;">
  <h1>This is text inside cover image</h1>
</div>
0.1.20

7 years ago

0.1.19

7 years ago

0.1.18

8 years ago

0.1.17

8 years ago

0.1.15

8 years ago

0.1.14

8 years ago

0.1.13

8 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago