1.1.0 • Published 5 years ago

gatsby-remark-images-zoom v1.1.0

Weekly downloads
295
License
MIT
Repository
github
Last release
5 years ago

👀 gatsby-remark-images-zoom

Bring medium-zoom to gatsby-remark-images

Note: this plugin requires gatsby-remark-images and gatsby-transformer-remark

Install

yarn add gatsby-remark-images-zoom

How to use

// In your gatsby-config.js, under gatsby-transformer-remark plugins

plugins: [
{
  resolve: `gatsby-transformer-remark`,
  options: {
    plugins: [
      `gatsby-remark-images`,
      `gatsby-remark-images-zoom`,
    ],
  }
];

Configuration

All options from medium zoom are available:

PropertyTypeDefaultDescription
marginnumber0The space outside the zoomed image
backgroundstring"#fff"The background of the overlay
zIndexnumber42The z-index of the overlay
scrollOffsetnumber40The number of pixels to scroll to close the zoom
containerstring | HTMLElement | objectnullThe viewport to render the zoom in
templatestring | HTMLTemplateElementnullThe template element to display on zoom