Skip to content

jitbit/nanobox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Nanobox

Extremely lightweight "lightbox". Zero-dependencies. Only 1.4 KB. And that's without minification and gzip.

Usage

<script src="https://cdn.jsdelivr.net/gh/jitbit/nanobox/nanobox.js"></script>

<a class="something" href="https://i.imgur.com/F36gf2O.jpg">click me</a>

<script>
	Nanobox.attach("a.something");
</script>

Supports images and iframes

If the link points to an image - clicking the link will show an image modal.

If not - if will show an iframe pointing to the link (so you can use it with Yoututbe videos for example)

Demo

https://codepen.io/jitbit/pen/MWBaNPq

About

extremely lightweight "lightbox"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published