0.1.20 • Published 9 years ago

react-cdnvision v0.1.20

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
9 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

9 years ago

0.1.19

9 years ago

0.1.18

10 years ago

0.1.17

10 years ago

0.1.15

10 years ago

0.1.14

10 years ago

0.1.13

10 years ago

0.1.12

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago