Skip to content

trizome/trzimg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>
            <Img
                src={url}
                width={400}
                height={200}
                opacity={0.5}
                filter="grayscale"
             />
        </div>
);
}

export default App;

Options

src

width

height

opacity

filter

About

replace html img

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published