A zero-dependency, lightweight lightbox targeting modern browsers. Intended as a straightforward replacement for old [fancybox][fancybox] usage.
npm install @wfleming/simpleboxA zero-dependency, lightweight lightbox targeting modern browsers. Intended as a straightforward
replacement for old [fancybox][fancybox] usage.
[fancybox]: https://www.npmjs.com/package/fancybox
npm install --save-dev wfleming/simplebox
`your_bundle.js`
import {SimpleBox} from "@wfleming/simplebox"
SimpleBox() // optionally can pass config like SimpleBox({selector: '[data-fancybox]', showThumbs: false})
`your_bundle.css`
@import "@wfleming/simplebox/dist/styles.css";
SimpleBox's default selector is [data-simplebox], if you have legacy usage of fancybox, you can{selector: '[data-fancybox']}
initialize SimpleBox with to get mostly compatible behavior.
Primary customization points are via options passed to the configuration of SimpleBox() and vialib/index.mjs
css variables. See source for details: config options are in defined underDEFAULT_CONFIG, and overridable CSS variables are at the top of lib/styles.css`.