Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.
fazetuPublic archive

About

htmlwidget for lightbox2 JS library

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

lightbox2

Use the lightbox2 javascript library to render image files in an htmlwidget.

Installation

devtools::install_github("fazetu/lightbox2")

Examples

library(lightbox2)

Get file paths to some image files.

images <- example_images()

Note there is also example_lightbox2().

These examples are not interactive, but demonstrate the different styling options available.

This R code chunk in R Markdown does not have results='asis'.

lightbox2(images)

4-1

Change thumbnail size.

lightbox2(images, thumbnailHeight = "50px", thumbnailWidth = "auto")

5-1

Change thumbnail alignment.

lightbox2(images, thumbnailHeight = "50px", thumbnailWidth = "auto", thumbnailAlign = "left")

6-1

Make it so we get a scroll bar by adjusting thumbnail height and max height of the widget.

lightbox2(images, thumbnailHeight = "200px", thumbnailWidth = "auto", maxHeight = "200px")

7-1

Adjust the size of the overall widget.

lightbox2(images, width = "50%")

8-1

Don’t center within the page.

lightbox2(images, width = "50%", margin = "none")

9-1

About

htmlwidget for lightbox2 JS library

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages