All Projects → ArunMichaelDsouza → React Image Appear

ArunMichaelDsouza / React Image Appear

Licence: mit
ReactJS component to make images appear with transition as they load.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Image Appear

Ng Image Appear
AngularJS Module to make images appear with transition as they load.
Stars: ✭ 120 (-54.55%)
Mutual labels:  loader, placeholder
Skeleton Elements
Skeleton elements - UI for improved perceived performance
Stars: ✭ 27 (-89.77%)
Mutual labels:  loader, placeholder
React Shimmer
🌠 Async loading, performant Image component for React.js
Stars: ✭ 990 (+275%)
Mutual labels:  loader, placeholder
React Content Loader
⚪ SVG-Powered component to easily create skeleton loadings.
Stars: ✭ 11,830 (+4381.06%)
Mutual labels:  loader, placeholder
React Native Loading Placeholder
React Native Loading Placeholder
Stars: ✭ 176 (-33.33%)
Mutual labels:  loader, placeholder
Rhplaceholder
Show pleasant loading view for your users 😍
Stars: ✭ 238 (-9.85%)
Mutual labels:  loader, placeholder
Ocskeleton
[OCSkeleton] - Make your loading view a little difference.
Stars: ✭ 184 (-30.3%)
Mutual labels:  loader, placeholder
webpack-image-placeholder-loader
Generate a solid color image as placeholder
Stars: ✭ 24 (-90.91%)
Mutual labels:  placeholder, loader
Loaders
Process dialogs, loading bars, etc.
Stars: ✭ 23 (-91.29%)
Mutual labels:  loader
config
Simple configuration management for PHP
Stars: ✭ 15 (-94.32%)
Mutual labels:  loader
StrafeAnalyzer
A tool that analyzes player inputs and tells the player how to improve player movement through statistics, realtime graphs, etc! :)
Stars: ✭ 20 (-92.42%)
Mutual labels:  loader
react-awesome-loaders
🚀 High quality, super responsive and completely customisable Loading Animations to insert into your website with single line of code.
Stars: ✭ 146 (-44.7%)
Mutual labels:  loader
snowplow-bigquery-loader
Loads Snowplow enriched events into Google BigQuery
Stars: ✭ 15 (-94.32%)
Mutual labels:  loader
Loader
Loader is an open source C++ cheat loader currently built for CS:GO
Stars: ✭ 49 (-81.44%)
Mutual labels:  loader
quill-placeholder-module
A quill module for adding placeholders
Stars: ✭ 27 (-89.77%)
Mutual labels:  placeholder
gd-obj
Obj file parser for Godot
Stars: ✭ 32 (-87.88%)
Mutual labels:  loader
otc
Onetap Crack Loader - Official ReHost
Stars: ✭ 46 (-82.58%)
Mutual labels:  loader
Vue Spinners
💫 A collection of loading spinner components for Vuejs
Stars: ✭ 255 (-3.41%)
Mutual labels:  loader
typedb-loader
TypeDB Loader - Data Migration Tool for TypeDB
Stars: ✭ 43 (-83.71%)
Mutual labels:  loader
typed-css-modules-loader
💠 Webpack loader for typed-css-modules auto-creation
Stars: ✭ 62 (-76.52%)
Mutual labels:  loader
react-image-appear icon

react-image-appear npm version NPM Downloads Build Status Patreon donate button

ReactJS component to make images appear with transition as they load.

Wraps an img within a placeholder element and adds a gif loader in between. No more ugly-looking progressively loading images!

react-image-appear

This project has also been ported to AngularJS 1.x - ng-image-appear.


Installation

via npm

npm install react-image-appear --save

via yarn

yarn add react-image-appear

Usage

Import the component and provide the src with any of the available props.

import ReactImageAppear from 'react-image-appear';

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    animation="zoomIn"
    animationDuration="1s"
/>

Props

src {string} | required

The image source.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
/>

className {string}

Classes to be applied to the image.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    className="my-image"
/>

loader {string}

Adds a custom loader to the component. When not provided, applies a default one.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    loader="https://cache.dominos.com/nolo/ca/en/010048/assets/build/images/img/spinner.gif"
/>

loader


loaderStyle {object}

Adds custom styling to the loader.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    loaderStyle={{ border: "2px solid red" }}
/>

loaderClass {string}

Adds CSS classes to the loader.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    loaderClass="my-loader"
/>

placeholder {boolean | string}

Adds a placeholder background to the component.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    placeholder
/>

placeholder

You can override the default placeholder background and add your own by passing an image URL to this prop.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    placeholder="http://getuikit.com/docs/images/placeholder_600x400.svg"
/>

placeholder-custom


placeholderStyle {object}

Adds custom styling to the placeholder.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    placeholderStyle={{ border: "2px solid red", backgroundColor: 'black' }}
/>

placeholderClass {string}

Adds CSS classes to the placeholder.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    loaderClass="my-placeholder"
/>

animation {string} | Default: fadeIn

Add a CSS3 powered animation to the image as it appears.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    animation="bounceIn"
/>

animation

react-image-appear has the following built-in CSS3 animations -

fadeIn (default)
fadeInUp
fadeInRight
fadeInDown
fadeInLeft
bounceIn
bounceInUp
bounceInRight
bounceInDown
bounceInLeft
flipInX
flipInY
zoomIn
blurIn
blurInUp
blurInRight
blurInDown
blurInLeft
fillIn

animationDuration {string} | Default: 700ms

Specifies the animation duration for the image to appear.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    animation="bounceIn"
    animationDuration="1s"
/>

easing {string} | Default: ease-in-out

Specifies the timing-function for the CSS3 powered animation.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    animation="bounceIn"
    easing="ease-in"
/>

showLoader {boolean} | Default: true

Specifies whether to show the loader or not.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    showLoader={false}
/>

show-loader


onClick {function}

Callback to be called when the image is clicked.

<ReactImageAppear 
    src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg"
    onClick={handleImageClick}
/>

Testing

ReactImageAppear uses the jest test runner along with enzyme for easier assertion and manipulation. Run the following command to start the jest test runner -

npm test

Contributors


Arun Michael Dsouza


Patrick


Stefan


Tim Carr


Support

If you'd like to help support the development of the project, please consider backing me on Patreon -


License

MIT Licensed

Copyright (c) 2018 Arun Michael Dsouza ([email protected])

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].