Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

smartphoto

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartphoto

smartphoto

  • 0.2.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

SmartPhoto

The most easy to use responsive image viwer especially for mobile devices

Feature

  • Flick images to zoom/drag images and also switch to next images
  • Use Accelerometer to move images
  • Scale images to fill/fit on the screen so to view each image clearly

Instration

  • npm
  • standalone

via npm

npm install smartphoto --save

or yarn

yarn add smartphoto

Usage

smartphoto.js

require

const smartPhoto = require('smartphoto');
window.addEventListener('load',function(){
    new smartPhoto(".js-img-viwer");
});

jquery-smartphoto.js

$(function(){
    $(".js-img-viwer").smartPhoto();
});

Option

variabledescriptiondefault
arrowsprev/next arrowstrue
navnavigation images at the bottomtrue
useOrientationApiuse accelerometer to move imagesfalse
resizeStyleresize images to fill/fit on the screen'fill'
animationSpeedanimation speed when switching images300
forceIntervalfrequency to apply force to images10

When you want to hide arrows and nav

window.addEventListener('load',function(){
    new smartPhoto(".js-img-viwer",{
        arrows: false,
        nav: false
    });
});

SCSS

variabledescriptiondefault
$animation-speedanimation speed when switching images.3s
$backdrop-colorbackdrop color when viewing imagesrgba(0, 0, 0, 1)
$header-colorheader colorrgba(0, 0, 0, .2)

Download

Download ZIP

Github

https://github.com/appleple/SmartPhoto

License

Code and documentation copyright 2017 by appleple, Inc. Code released under the MIT License.

FAQs

Package last updated on 20 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc