Skip to content

Buildfire Image Preview Component

o5faruk edited this page May 2, 2021 · 2 revisions

⚠️⚠️⚠️

This sdk documentation is deprecated and will not be updated. Check out our new docs at https://sdk.buildfire.com/docs/image-preview/

⚠️⚠️⚠️

buildfire.imagePreviewer

The fullscreen image preview API allows a developer to instantiate a fullscreen image carousel in app. This is to give a better viewing experience to the end user.

How to use image previewer

show(options, callback)

options

  • images
    • Array
    • Image urls to display in full screen image carousel
  • index
    • Number, optional
    • Index of image to start carousel from
    • Defaults to 0

callback

  • Callback function that gets called when carousel is closed

Example

const callback = () => {
   console.log("Image Previewer Closed");
}

const options = {
   images: ['https://placekitten.com/408/287']
};

buildfire.imagePreviewer.show(options, callback)
Clone this wiki locally