All Projects → ArunMichaelDsouza → Ng Image Appear

ArunMichaelDsouza / Ng Image Appear

Licence: mit
AngularJS Module 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 Ng Image Appear

Ocskeleton
[OCSkeleton] - Make your loading view a little difference.
Stars: ✭ 184 (+53.33%)
Mutual labels:  loader, placeholder
React Content Loader
⚪ SVG-Powered component to easily create skeleton loadings.
Stars: ✭ 11,830 (+9758.33%)
Mutual labels:  loader, placeholder
React Native Loading Placeholder
React Native Loading Placeholder
Stars: ✭ 176 (+46.67%)
Mutual labels:  loader, placeholder
Rhplaceholder
Show pleasant loading view for your users 😍
Stars: ✭ 238 (+98.33%)
Mutual labels:  loader, placeholder
webpack-image-placeholder-loader
Generate a solid color image as placeholder
Stars: ✭ 24 (-80%)
Mutual labels:  placeholder, loader
Skeleton Elements
Skeleton elements - UI for improved perceived performance
Stars: ✭ 27 (-77.5%)
Mutual labels:  loader, placeholder
React Image Appear
ReactJS component to make images appear with transition as they load.
Stars: ✭ 264 (+120%)
Mutual labels:  loader, placeholder
React Shimmer
🌠 Async loading, performant Image component for React.js
Stars: ✭ 990 (+725%)
Mutual labels:  loader, placeholder
Vue Svg Inline Loader
Webpack loader used for inline replacement of SVG images with actual content of SVG files in Vue projects.
Stars: ✭ 105 (-12.5%)
Mutual labels:  loader
Vue Content Placeholders
Composable components for rendering fake (progressive) content like facebook in vue
Stars: ✭ 1,547 (+1189.17%)
Mutual labels:  loader
Csv2db
The CSV to database command line loader
Stars: ✭ 102 (-15%)
Mutual labels:  loader
Nvactivityindicatorview
A collection of awesome loading animations
Stars: ✭ 10,031 (+8259.17%)
Mutual labels:  loader
Eclipseloading
🌞 日食加载动画
Stars: ✭ 114 (-5%)
Mutual labels:  loader
Broccoli
📟An Android library that shows the placeholder of the view.
Stars: ✭ 1,390 (+1058.33%)
Mutual labels:  placeholder
Ghidra Gamecube Loader
A Nintendo GameCube binary loader for Ghidra
Stars: ✭ 117 (-2.5%)
Mutual labels:  loader
Mkloader
Beautiful and smooth custom loading views
Stars: ✭ 1,377 (+1047.5%)
Mutual labels:  loader
Fe Blog
前端学习笔记,JavaScript基础,LeetCode,手写API,Vue源码解析,前端面试题
Stars: ✭ 99 (-17.5%)
Mutual labels:  loader
Toast
A modern JS/CSS asset loader, written in TypeScript.
Stars: ✭ 118 (-1.67%)
Mutual labels:  loader
Skeletonview
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
Stars: ✭ 10,804 (+8903.33%)
Mutual labels:  placeholder
Node Hot Loader
Hot module replacement (hot reload) for Node.js applications. Develop without server restarting.
Stars: ✭ 111 (-7.5%)
Mutual labels:  loader
ng-image-appear icon

ng-image-appear npm version NPM Downloads Latest Stable Version Patreon donate button

AngularJS Module to make images appear with transition as they load.

Wraps the img tag within a wrapper and adds a gif loader in between. No more ugly-looking progressively loading images!

http://arunmichaeldsouza.github.io/ng-image-appear/

Demo on CodePen

ng-image-appear

This project has also been ported to ReactJS - react-image-appear.


Installation

CDN

Use ng-image-appear directly from jsdelivr CDN

https://cdn.jsdelivr.net/npm/[email protected]/dist/ng-image-appear.min.js

via bower

You can install the package using bower. Make sure you have bower installed, then run :

bower install ng-image-appear

via npm

npm install ng-image-appear

Or, download the latest version and include ng-image-appear.min.js to your project.

Add ngImageAppear as a dependency in your angular app module.


Usage

Include the directive with an img tag in your HTML file with any of the available options.

Include the src and the ng-image-appear directive as an attribute.

Example -

var myApp = angular.module('myApp', ['ngImageAppear']);

myApp.controller('appCtrl', ['$scope', function($scope) {
				
}]);
<img 
	src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg" 
	ng-image-appear 
	responsive
	transition-duration="1s"
	animation="fillIn"
	animation-duration="1s"
	easing="ease-out"
/> 

Options

transition-duration

This parameter specifies the transition duration for the image to appear. Default value is 700ms.

Example -

<img 
	src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg" 
	ng-image-appear
	transition-duration="4s"
/> 

bg-color

Adds a background color to the image wrapper element.

Example -

<img 
	src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg" 
	ng-image-appear
	bg-color="#50a4e2"
/> 

bg-color


no-loader

If this option is specified, then no gif loader is shown in the image wrapper element.

Example -

<img 
	src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg" 
	ng-image-appear
	no-loader
/> 

no-loader


responsive

Use this option to make the image wrapper responsive. In that case the width of the wrapper is calculated in %, otherwise it is calculated in px.

Example -

<img 
	src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg" 
	ng-image-appear
	responsive
/> 

responsive


placeholder

Adds a default placeholder in the image wrapper background.

Example -

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

placeholder

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

Example -

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

placeholder-custom


placeholder-class

Use this option to add a CSS class to the placeholder background.

Example -

<style>
	.placeholder-css {
		background-size: contain;
	}
</style>

<img 
	src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg" 
	ng-image-appear
	placeholder
	placeholder-class="placeholder-css"
/> 

placeholder-style

Add CSS styles to the placeholder background using this option.

Example -

<img 
	src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg" 
	ng-image-appear
	placeholder
	placeholder-style="background-size: contain;"
/> 

loader-img

Add a custom gif loader in the image wrapper. Default width and height of the loader is 40px. The image must be a gif.

Example -

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

loader-img


loader-class

Use this option to add a CSS class to the loader element.

Example -

<style>
	.loader-css {
		width: 60px; 
		height: 60px; 
		left: calc((100% - 60px) / 2); 
		top: calc((100% - 60px) / 2);
	}
</style>

<img 
	src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg" 
	ng-image-appear
	loader-class="loader-css"
/> 

loader-style

Add CSS styles to the loader element using this option.

Example -

<img 
	src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg" 
	ng-image-appear
	loader-styles="width: 60px; height: 60px; left: calc((100% - 60px) / 2); top: calc((100% - 60px) / 2);"
/> 

animation

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

Example -

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

animation

ng-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

animation-duration

This parameter specifies the animation duration for the image to appear. Default value is 700ms.

Example -

<img 
	src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg" 
	ng-image-appear
	animation="fillIn"
	animation-duration="2s"
/> 

easing

Specifies the timing-function for the CSS3 powered transition/animation. Default value is ease-in-out.

Example -

<img 
	src="https://newevolutiondesigns.com/images/freebies/tropical-beach-background-8.jpg" 
	ng-image-appear
	animation="bounceIn"
	easing="ease-out"
/> 

Contributors


Arun Michael Dsouza


Travis Vignon


Lukas Drgon


Support

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


License

MIT Licensed

Copyright (c) 2016 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].