sterogrid
v0.1.0
Published
``` $ npm install sterogrid --save ```
Downloads
1
Readme
SteroGrid - Grid on Steroids
Getting Started
$ npm install sterogrid --save
Include those two files your index.html
:
<script src="node_modules/sterogrid/sterogrid.js"></script>
<link rel="stylesheet" type="text/css" href="node_modules/sterogrid/sterogrid.css">
<div id="here-goes-the-grid"></div>
And in your app.js
:
let options = {
columns: [{
field: 'thumbnail',
name: 'Thumbnail'
}, {
field: 'title',
name: 'Title',
width: 250,
cellFilter: (title, film) => `${title} (${film.year})`
}, {
field: 'rating',
name: 'Rating'
}],
data: [{
title: 'The Shawshank Redemption',
rating: 9.2,
year: 1994
}, {
title: 'The Godfather',
rating: 9.2,
year: 1972
}]
};
new SteroGrid.Grid(document.getElementById('here-goes-your-grid'), options);