either for noobs
or veterans
Chocolat comes with an API and multiples CSS classes which make it very handy to use for advanced users, and very easy to use for noobs.
Chocolat.js enables you to display one or several images staying on the same page.
The choice is left to the user to group together a series of pictures as a link, or let them appear as thumbnails.
The viewer may appears full-page or in a block.
$ yarn add chocolat
Chocolat comes with an API and multiples CSS classes which make it very handy to use for advanced users, and very easy to use for noobs.
Chocolat works well with all major browser. It has been tested on : IE9+, firefox, chrome, opera, safari.
Chocolat.js is only 23 kb and reaches 10 kb once minified.
Chocolat works on desktop, tablet & mobile, you can also define your own breakpoints.
You can put images thumbnails within those links.
Image captions are adressed to the title atribute.
Links must have the css class chocolat-image.
Finally, we call the script that will enable navigation
The call is as follows:
Chocolat(document.querySelectorAll('selector'))
If you want to embrace the full power of chocolat check the documentation
If you do not understand the subtleties of the installation,
try using the sample page provided in the archive.