Colorbox is a light-weight customizable lightbox plugin for jQuery. This module allows for integration of Colorbox into Drupal.
Images, iframed or inline content etc. can be displayed in a overlay above the current page.
The Colorbox module:
- Works as a Formatter in entities and in views.
- Excellent integration with core image field and image styles and the Insert module
- Choose between a default style and a number of other styles that are included.
- Style the Colorbox with a custom Colorbox style in your theme.
- Drush command, drush colorbox-plugin, to download and install the Colorbox plugin in sites/all/libraries.
The Colorbox plugin:
- Compatible with: jQuery 1.3.2+ in Firefox, Safari, Chrome, Opera, Internet Explorer 7+
- Supports photos, grouping, slideshow, ajax, inline, and iframed content.
- Appearance is controlled through CSS so it can be restyled.
- Can be extended with callbacks & event-hooks without altering the source files.
- Completely unobtrusive, options are set in the JS and require no changes to existing HTML.
- Preloads upcoming images in a photo group.
- Well vetted and currently in use in over 600,000 websites.
- Released under the MIT License
The plugin is separate downloaded.
Colorbox for Drupal 8
Drupal 8 is now in beta and I try to keep Colorbox 8.x-1.x-dev working for them. Colorbox for Drupal 8 is a image field formatter and nothing more, or less. The extra features like colorbox_load, colorbox_inline and views trigger field have been removed to keep the module clean and neat.
If someone would like the extra features in Drupal 8 feel free to create e.g. a "Colorbox extras" module and implement them there.
Installation for Drupal 7 (2.x)
Download and install the Libraries API 2 module and the Colorbox module as normal. Then download the Colorbox plugin. Make sure to use the 1.x branch since that will stay backwards compatible with older jQuery version, like the ones included with Drupal.
Unpack and rename the plugin directory to "colorbox" and place it inside the "sites/all/libraries" directory. Make sure the path to the plugin file becomes: "sites/all/libraries/colorbox/jquery.colorbox-min.js"
Form support in Colorbox is removed in 7.x-2.x
Use Modal forms (with ctools) instead or one of the other modules that has this feature, there are a number of them.
The attempt to support opening various forms in a Colorbox was in hindsight never a good idea. Form error handling and form redirects are complicated, a lot of code would be needed to do it correctly.
If you absolutely want to continue using the form support you need to stay with 7.x-1.x.
Part 1 to 3 is for an older 7.x-1.x version of the Colorbox module.
- Colorbox for Drupal 7, part 1: Installation and image field integration on Vimeo
- Colorbox for Drupal 7, part 2: Inline images with the Insert module on Vimeo
- Colorbox for Drupal 7, part 3: Building a image gallery and a image slideshow.
- Drupal 7 Colorbox module by Code Karate
- Creating and Theming a Node Photo Gallery with Drupal 7 and Colorbox by High Rock Media.
- How to Build a Lightbox Portfolio in Drupal 7 by CMS Quickstart
Modules that extend Colorbox
- Field Group Colorbox - Provides fieldgroups for Colorbox triggers and for Colorbox popups.
- Colorbox Node - Open nodes and webforms in a Colorbox.
- Field formatter for colorbox module
- Media Colorbox - Integrates Colorbox with the Media module.
Modules that have built in support for Colorbox
- Video Embed Field
- Embedded Media Field (Enable Colorbox load in the settings.)
- Media Gallery (Make use of the same Colorbox plugin but has it own integration code for it.)
- Field Slideshow
- Directory based organisational layer
- Gallery Assist via Gallery Assist Lightboxes
- Gallery formatter
- Get Directions
- Image Picker
- Slick Carousel
- All versions: The Colorbox plugin 1.x installed in sites/all/libraries
- Drupal 7.x-2.x only: Libraries API 2
- Drupal 6 only: The Old 1.3.18 version of the Colorbox plugin and jQuery Update module version 6.x-2.0-alpha1 or later
You need to download the Colorbox plugin from the site above, the git repo doesn't contains the minified version so will not work. The easiest way to download and install the plugin is via the built in Drush command, drush colorbox-plugin.
For Drupal 6 users
The latest version of the Colorbox plugin, 1.3.19+, needs jQuery 1.4.3+. Drupal 6 users need to use the old 1.3.18 version of the plugin. It can be downloaded from the link below.
Colorbox is on D6 maintainer search: Interested in becoming a (co-)maintainer of the Drupal 6 branch?
Please read the article Comparison of Lightbox-type modules.
- Maintenance status: Seeking co-maintainer(s)
- Development status: Maintenance fixes only
- Reported installs: 257,416 sites currently report using this module. View usage statistics.
- Downloads: 1,368,620
- Automated tests: Enabled
- Last modified: August 7, 2015