StealThis .dev

Auto-fit Bento Tiles

Resize the tile minimum to see CSS Grid auto-fit adapt without a breakpoint list.

Open in Lab
html css javascript react
Targets: TS JS HTML React

Code

Auto-fit Bento Tiles

Resize the tile minimum to see CSS Grid auto-fit adapt without a breakpoint list.

Support notes

CSS Grid and columns do most of the layout work. The drag demo adds native DnD only for rearrangement; keep tile order in application state when integrating it.

Included demo

  • Vanilla HTML, CSS, and JavaScript with zero external dependencies.
  • React equivalent using the same interaction model.
  • A Lab route for trying the behavior in isolation.

Integration checklist

Keep state updates separate from presentation, preserve semantic labels, and add persistence or server callbacks at the boundary where your product needs them.