Prism Flex & Grid Lab is a hands-on playground for CSS layout. Switch between Flexbox and Grid, change any container property, click individual items to set grow/shrink/basis/order or grid placement, and resize the stage to test responsiveness. The generated code only contains properties that differ from defaults, and can be exported as Tailwind classes.
- Flexbox + Grid modes with every common container property
- Per-item controls β flex-grow/shrink/basis, order, align-self, grid-column/row
- Presets: center anything, navbar, wrap cards, stack, 3-col, auto-fit cards, holy grail
- Resizable stage to test wrapping and responsiveness
- Minimal CSS output (defaults omitted) and Tailwind class export
- State saved locally
![]() |
![]() |
Use it online: https://krishyaa06.github.io/prism-flex-grid/
Run locally:
git clone https://github.com/krishyaa06/prism-flex-grid.git
cd prism-flex-grid
# open index.html in your browser, or serve it:
npx serve .- Choose Flexbox or Grid and adjust the container controls.
- Click an item in the preview to edit its own properties.
- Drag the stage corner to resize; copy the CSS or Tailwind output.
prism-flex-grid/
βββ assets/
β βββ logo.png
β βββ logo.svg
βββ css/
β βββ app.css
β βββ prism.css
βββ js/
β βββ app.js # controls and live preview
β βββ core.js # CSS / Tailwind generators + presets β tested in Node
β βββ prism.js
βββ test/
β βββ core.test.js
βββ .gitignore
βββ LICENSE
βββ README.md
βββ index.html
βββ package.json
npm testTests use the built-in node:test runner, so there is nothing to install. CI runs them on Node 20 and 22.
- Fork the repo and create a branch:
git checkout -b feature/my-idea - Make your change and add a test in
test/ - Run
npm testand open a Pull Request
Prism Flex & Grid Lab is one of the open-source tools built by Prism Protocol, a tech community where young builders learn, ship and compete together.
![]() Soumya Bhandare Founder @ Prism Protocol |
|
Released under the MIT License.
If you like this project, consider giving it a β
"Build. Create. Compete." Β· Made with β‘ by Prism Protocol



