Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
grid-gallery
Advanced tools
Readme
JavaScript grid gallery to produce un-equal cols grid
via npm grid gallery can be used via CommonJS or AMD after installation via npm.
$ npm install --save grid-gallery
bower
$ bower install --save grid-gallery
the container must have grid-gallery
class and the grid items grid-gallery__item
<link rel="stylesheet" href="path/to/grid-gallery/dist/css/grid-gallery.min.css">
...
<!-- grid container -->
<div id="container" class="grid-gallery">
<!-- grid item -->
<div class="grid-gallery__item">
<div>
<!-- some content -->
</div>
</div>
<!-- grid item -->
<div class="grid-gallery__item">
<div>
<!-- some content -->
</div>
</div>
....
</div>
...
<script src="path/to/grid-gallery/dist/js/grid-gallery.js"></script>
var GridGallery = require('grid-gallery');
var options = { ... }
var myGrid = new GridGallery(document.getElementById('container'), options);
import GridGallery from 'grid-gallery';
var options = { ... }
var myGrid = new GridGallery(document.getElementById('container'), options);
require(['grid-gallery'], (GridGallery) => {
var options = { ... }
var myGrid = new GridGallery(document.getElementById('container'), options);
})
var options = {
direction: 'right', // left is default for ltr and right for rtl.
watch: true, // false by default, and if set to true
// it will watch DOM changes
// and update positions if grid item inserted/removed
// callbacks
onInitialize: () => { ... }, // called before init.
onInitialized: () => { ... }, // called after init.
onUpdate: () => { ... }, // called before update after 'resize' event as example.
onUpdated: () => { ... }, // called after updated.
onPosition: () => { ... }, // called before setting position of grid items
onPositioned: () => { ... }, // called after positioning the grid items
}
update
it will reposition the grid itemsdestroy
it will clear the positions, reset all options and remove event handlers.FAQs
un-equal columns grid
The npm package grid-gallery receives a total of 6 weekly downloads. As such, grid-gallery popularity was classified as not popular.
We found that grid-gallery demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.