A regular CSS `grid` container
npm install regular-layoutA library for resizable & repositionable panel layouts, using
CSS grid.
- Zero depedencies, pure TypeScript, tiny.
- Implemented as a Web Component,
interoperable with any framework and fully customizable.
- Covered in bees.
``bash`
npm install regular-layout
Add the custom element to your HTML:
`html`
Main content
Sidebar content
Create and manipulate layouts programmatically:
`javascript
import "regular-layout/dist/index.js";
const layout = document.querySelector('regular-layout');
// Add panels
layout.insertPanel('main');
layout.insertPanel('sidebar');
// Save layout state
const state = layout.save();
// Remove panels (this does not change the DOM, the element is unslotted).
layout.removePanel('sidebar');
// Restore saved state
layout.restore(state);
`
Create repositionable panels using :
`html``
Main content