@dreamworld/dw-image

1.5.1 • Public • Published

dw-image

A WebComponent to show zoomable image on documentation & blog sites.

Behaviours

  • Auto compute height or width based on auto property, give another value as a css of element.
  • When user click on image, then image open in dialog using zoomSrc property. if zoomSrc is not available then use src property to show image in dialog.
  • If you want to disable the above zoomable behaviour then disableZoom property passed as a true.

Examples

  • Default example

      <dw-image src='https://picsum.photos/id/237/200/300' zoom-src='https://picsum.photos/id/237/1000/1000'></dw-image>
      <!-- In this above case you give a height css property as an element. -->
      dw-image {
        width: 200px;
      }
  • Auto width

      <dw-image auto='width' src='https://picsum.photos/id/237/200/300' zoom-src='https://picsum.photos/id/237/1000/1000'></dw-image>
  • Auto none

      <dw-image auto='none' src='https://picsum.photos/id/237/200/300' zoom-src='https://picsum.photos/id/237/1000/1000'></dw-image>
      <!-- In this above case you give a height css property as an element. -->
      dw-image {
        height: 200px;
      }
  • Disabled zoomable behaviour and open link click on image.

      <a href="https://www.google.com/">
        <dw-image src='https://picsum.photos/id/237/200/300' disable-zoom></dw-image>
      </a>

Properties

Property Attribute Type Description
auto auto string Auto compute css property name.
Default value: height
Possible value: height, width, none.
disableZoom disable-zoom boolean Disabled zoom behaviour when this value is true.
src src string Image path/source.
title title string Image title.
zoomSrc zoom-src string Zoomable image path.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.0-init.10init
1.5.11latest
1.5.1-change-in-fallbacksrc.10change-in-fallbacksrc
1.5.0-fallBackSrc-support.10fallBackSrc-support
1.4.5-dw-image-loading.10dw-image-loading
1.4.3-chagne-css-property.10chagne-css-property
1.4.2-full-screen-issue.10full-screen-issue
1.4.1-full-screen-misc.10full-screen-misc
1.4.0-full-screen.10full-screen
1.3.1-image-lazy-loading.10image-lazy-loading
1.3.0-outside-click-close-image.10outside-click-close-image
1.3.0-image-max-width.10image-max-width
1.2.2-image-title-issue.10image-title-issue
1.1.0-dw-image-as-es-module.10dw-image-as-es-module
1.4.4-event-issue.11event-issue

Version History

VersionDownloads (Last 7 Days)Published
1.5.11
1.5.1-change-in-fallbacksrc.10
1.5.00
1.5.0-fallBackSrc-support.10
1.4.60
1.4.50
1.4.5-dw-image-loading.10
1.4.40
1.4.4-event-issue.11
1.4.3-event-issue.10
1.4.30
1.4.3-chagne-css-property.10
1.4.20
1.4.2-full-screen-issue.10
1.4.10
1.4.1-full-screen-misc.10
1.4.00
1.4.0-full-screen.10
1.3.10
1.3.1-image-lazy-loading.10
1.3.00
1.3.0-outside-click-close-image.10
1.2.30
1.2.20
1.2.2-image-title-issue.10
1.2.10
1.3.0-image-max-width.10
1.2.00
1.1.00
1.1.0-dw-image-as-es-module.10
1.0.00
1.0.0-init.10

Package Sidebar

Install

npm i @dreamworld/dw-image

Weekly Downloads

2

Version

1.5.1

License

ISC

Unpacked Size

15.5 kB

Total Files

4

Last publish

Collaborators

  • chiragmoradiya
  • chetang7
  • ajay-dhameliya
  • dw-devops