zmp-plugin-image-zoom
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

docusaurus-plugin-image-zoom

Docusaurus plugin to utilize medium-zoom in your projects easily!

Install

npm install docusaurus-plugin-image-zoom

Usage

Add as a plugin to docusaurus.config.js:

  plugins: [
    require.resolve('docusaurus-plugin-image-zoom')
  ],

Configuration

This plugin allows you to configure the following options:

Option Description Default Value
selector (optional) The selector to use for the images to zoom. .markdown img
background (optional) The background color to use for the zoomed image. { light: 'rgb(255, 255, 255)', dark: 'rgb(50, 50, 50)' }
config (optional) The configuration object to pass to medium-zoom. {}

Example usage in docusaurus.config.js:

  themeConfig: {
    zoom: {
      selector: '.markdown :not(em) > img',
      background: {
        light: 'rgb(255, 255, 255)',
        dark: 'rgb(50, 50, 50)'
      },
      config: {
        // options you can specify via https://github.com/francoischalifour/medium-zoom#usage
      }
    }
  },

Readme

Keywords

none

Package Sidebar

Install

npm i zmp-plugin-image-zoom

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

16.1 kB

Total Files

15

Last publish

Collaborators

  • dungnn