@ppci/grid-view
v1.1.10
Published
Html grid
Downloads
8
Readme
Grid
Table of contents
Installation
NPM
npm i @ppci/grid-view
// Polyfill: https://lit-element.polymer-project.org/guide/use#polyfills
npm i --save-dev @webcomponents/webcomponentsjs
Usage
Javascript
import '@ppci/grid-view'
Browser
<!-- Default -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci/grid-view/builds/index.min.js" />
<!-- Legacy -->
<script type="module" src="https://cdn.jsdelivr.net/npm/@ppci/grid-view/builds/legacy.min.js" />
<!-- Component -->
<grid-view
rowSize=${String}
>
<slot></slot>
</grid-view>
Styling
grid-view {
--grid-columns: 4;
--grid--column-width: 1f;
/* Responsive */
@media (max-width: 600px) {
--grid-columns: 2;
}
}