gitmyhub

colorbox

JavaScript ★ 4.7k updated 2y ago ▣ archived

A light-weight, customizable lightbox plugin for jQuery

Colorbox is a jQuery plugin that displays images, videos, and other content in a lightbox overlay on top of the current page, with support for slideshows, inline content, and five built-in visual themes.

JavaScriptjQueryCSSsetup: easycomplexity 2/5

Colorbox is a jQuery plugin that displays images, videos, and other content in a lightbox, which is an overlay that appears on top of the current page without navigating away. When a visitor clicks a link or thumbnail on your website, Colorbox intercepts the click, fades in a box in the center of the screen showing the content, and dims the rest of the page behind it. The visitor can close it by clicking outside the box, pressing Escape, or clicking a close button.

The plugin can handle several types of content: images displayed directly, groups of images shown as a slideshow with navigation arrows, pages or other content loaded inside an embedded frame, HTML from the same page shown inline, and content fetched from a URL in the background. It is configurable through a range of options that control dimensions, animation speed, button visibility, captions, retina image support, and other behavior.

Colorbox requires jQuery and is intended for websites that already use it. You include the plugin's JavaScript file alongside jQuery, add a small CSS file for the default appearance, and then call the plugin on any links you want to open in the overlay. Five pre-built themes are included in the repository so you can choose a visual style without writing custom CSS.

The README is almost entirely a version history, listing every change from 2012 through 2016 across more than 60 releases. The last release was version 1.6.4 in May 2016. The project is released under the MIT license and full documentation is available on the author's website rather than in the repository itself. The project appears to be in maintenance mode with no new features added in recent years.

Where it fits