Skip to content
On this page

Single image

With this component, you can zoom in on an image to see it near and better view it.

Usage

javascript
// Import JS
import {
  SingleImage
} from "vue-pretty-box";
html
<SingleImage
  imageUrl="..."
  animation="fade"
/>
Alt for the image

Props

Accepted props: animation, imageUrl, alt, isRounded/is-rounded, isCircled/is-circled, hasShadow/has-shadow, figcaption, and bgBackdropClose .

Note: Props with * are required.

PropTypeDefaultComment
imageUrl *Stringhttps://picsum.photos/1280/720?randomURL for the image to zoom in.
animationStringfadeAnimation to open modal with the image.
altStringEmptyAlt text for the image.
isRounded/is-roundedBooleanfalseAdd little rounded corners.
isCircled/is-circledBooleanfalseMake a circle with the image. It works better with a square image.
hasShadow/has-shadowBooleanfalseAdd a little shadow to the image.
figcaptionStringEmptyAdd figcaption text to image, it is visible only when you open the image.
bgBackdropClose/bg-backdrop-closeBooleanfalseYou can close the image modal by clicking the background.