FelixWieland / solid-gridstack

solid-js wrapper for gridstack.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

solid-gridstack

solid-gridstack

pnpm npm

A simple wrapper around gridstack.js for solid-js.

Quick start

Install it:

npm i solid-gridstack
# or
yarn add solid-gridstack
# or
pnpm add solid-gridstack

Use it:

import { GridStack } from 'solid-gridstack'

const App = () => (
  <GridStack
    div={{ style: { 'margin': '2.5px' }}}
    items={[...new Array(5)].map((_, i) => (
      <div gs-x={0} gs-y={i * 2} gs-w={12} gs-h={2} gs-auto-position="true">
        <div style={{
          'margin': '2.5px',
          'background-color': 'rgb(68 107 158)',
          'height': 'calc(100% - 5px)',
          'width': 'calc(100% - 5px)',
          'border-radius': '7.5px'
        }}></div>
      </div>
    ))}
  />
);

About

solid-js wrapper for gridstack.js

License:MIT License


Languages

Language:TypeScript 78.3%Language:HTML 11.3%Language:CSS 10.4%