- Options / Defaults
- Browser Support
npm install luminous-lightbox
bower install luminous
- Manual: Download and use
If you're using the pre-built version of Luminous, it will automatically make
window.LuminousGallery available for your use when included on your page.
If you prefer to use
require statements and a build tool like Browserify, there are a couple other things to keep in mind. First,
require('luminous-lightbox') gives you an object with
LuminousGallery keys. You can use it in the following ways:
If your project uses ES6, you can do the following instead:
Once you've installed Luminous via one of the above methods, you're ready to get started. There are no dependencies, so you can just start making cool stuff. Check out the announcement blog post, or take a peek at our demo. Here's an example of a basic implementation:
Luminous supports gallery-style navigation using the LuminousGallery class. It works nearly the same as Luminous, but has a slightly different method of instantiation.
Here's an example of using Luminous with a custom configuration. All of the listed options are displayed with their default value.
LuminousGallery supports two sets of options arguments. The first set is specific to the gallery itself, and the second specifies the options that get passed to its child Luminous instances.
By default, Luminous injects an extremely basic set of styles into the page via the
injectBaseStyles option. You will almost certainly want to extend these basic styles for a prettier, more usable experience that matches your site. If you need to do something very out of the ordinary, or just prefer to include the default styles in CSS yourself, you can pass
injectBaseStyles: false when instantiating a new instance of Luminous. Please note that if you disable the included base styles, you will still need to provide an animation for
.lum-lightbox.lum-closing (this can be a "noop" style animation, as seen in the base styles source).
There is also an included basic theme (
luminous-basic.css) that may meet your needs, or at least give a good example of how to build out your own custom styles. This can either be included in your site's CSS via
@import "node_modules/luminous-lightbox/dist/luminous-basic.css"; or as a linked stylesheet in your HTML.
namespace option can be used as a way to easily apply different themes to specific instances of Luminous.
We support the latest version of Google Chrome (which automatically updates whenever it detects that a new version of the browser is available). We also support the current and previous major releases of desktop Firefox, Internet Explorer, and Safari on a rolling basis. Mobile support is tested on the most recent minor version of the current and previous major release for the default browser on iOS and Android (e.g., iOS 9.2 and 8.4). Each time a new version is released, we begin supporting that version and stop supporting the third most recent version.
Luminous was made by imgix. It's licensed under the BSD 2-Clause license (see the license file for more info). Any contribution is absolutely welcome, but please review the contribution guidelines before getting started.