trzimg

0.1.4 • Public • Published

trzimg

TRzImg is a simple react library to replace the html img tag. Easily add a filter (sepia, grayscale, ...) or define a display mode (cover, ...).

Install

npm i trzimg

Exemples

import React from 'react';
import {Img} from 'trzimg';

function App() {

    const url= 'https://www.elle.be/fr/wp-content/uploads/2018/07/skincare-480x545.jpg';
    
    return (
        <div>
            <div >
            <Img
                src={url}
                width={400}
                height={200}
                opacity={0.5}
                filter="grayscale"/>
            </div>
        </div>
);
}

export default App;

Options

src

width

height

opacity

filter

Package Sidebar

Install

npm i trzimg

Weekly Downloads

1

Version

0.1.4

License

ISC

Unpacked Size

8.38 kB

Total Files

4

Last publish

Collaborators

  • trizome