Socket
Socket
Sign inDemoInstall

hoverzoom

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hoverzoom

Dependency free zoom element on hover


Version published
Maintainers
1
Install size
6.91 kB
Created

Readme

Source

HoverZoom

Dependency free zoom element on hover

Setup

npm install hoverzoom
<div id="container">
	<div>Some content for zooming</div>
</div>
import HoverZoom from "hoverzoom";

const hoverZoom = new HoverZoom("#container", options);

Options

OptionTypeDefaultDescription
modestringcontaincontain, cover, autoHeight or autoWidth
paddingnumber | object{top: 0, right: 0, bottom: 0, left: 0}Sets padding for hover

Methods

MethodArgumentDescription
updateScaleUpdate scale value according to sizes of container and it's content
updateupdateScale = trueRedraw

License

MIT

Copyright © 2017 Eugene Nesvetaev

Keywords

FAQs

Last updated on 24 Aug 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc