8000 GitHub - acrool/acrool-react-img at refs/heads/storybook
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

acrool/acrool-react-img

 
 

Repository files navigation

Acrool React Img

Acrool React Img Logo

Fast custom img for Reactjs

NPM npm npm

npm downloads npm

Features

  • Support width, height, aspect
  • Support lazy load image
  • Support mask animate

Install

yarn add @acrool/react-img

Usage

add in your index.tsx

import "@acrool/react-img/dist/index.css";

then in your page

import {Flex, fr, Grid} from '@acrool/react-grid';
import styled from 'styled-components';

import {Img} from '@acrool/react-img';
import {generatorArray} from '@acrool/js-utils/array';

const Example = () => {
    return <Img
        src="https://acrool-react-picker.pages.dev/sample/1.jpg"
        w={200}
        h={200}
        isLazy
    />;
};

export default Example;

There is also a example that you can play with it:

Play react-editext-example

License

MIT © imagine10255

0