Skip to content

v1.5.2 • UI • 2kb gzipped • MIT

GridSense

Container-query-driven layout for components that adapt to their box, not the viewport.

★ 5.2kGitHub
↓ 7.2k / week● MIT● TS 5.0+
gridsense-preview.png
Abstract preview graphic for GridSense

// why gridsense

The component decides

Layout responds to the space a component is actually given, so the same card works in a sidebar and a full-width row.

● 14ms render● 60fps● 0 deps

// stack

Native where possible

Uses container queries directly and only observes sizes where the browser cannot.

GridSense started as a single file in a client project and stayed small on purpose. It does one job, it does it in 2kb gzipped, and it has no runtime dependencies.

Getting started

Install it, import it, call it:

npm i gridsense-js

Layout responds to the space a component is actually given, so the same card works in a sidebar and a full-width row.

What it does not do

It does not manage your state, style your components or ship a plugin system. Those are your decisions, and keeping them out is what keeps the bundle honest.

  • Container-first breakpoints
  • Observer fallback
  • MIT licensed, commercially friendly

Features

Container-first breakpoints

Breakpoints are declared per component instead of globally.

Observer fallback

Falls back to a resize observer with the same declarative configuration.

Dark mode ready

Reads from CSS custom properties, so a theme switch needs no JavaScript at all.

Container aware

Adapts to the box it is given rather than the viewport, so it works in a sidebar.

Accessibility audited

Tested against screen readers on three platforms, with the findings published in the repository.

ESM and types

Ships module and CommonJS builds with hand-written type definitions and source maps.

Get GridSense v1.5.2

8 files • .min.js 2kb • .zip 94kb • sha384 verified

Changelog

v1.5.2 Oct 4 2025 • latest
  • Native container query path
  • Per-component breakpoint sets
  • Observer fallback trimmed
v1.5.1 Jul 16 2025
  • Improved error messages for invalid options
  • Added twenty regression tests
v1.5 May 20 2025
  • Node 18 is now the minimum supported version
  • CommonJS build restored for older bundlers
View full archive →

// related

Related products

Sep 10 • v2.0

ChartForge

Canvas charts in twelve lines. Responsive, accessible and dark-mode ready, with no D3 learning curve.

View →
Aug 30 • v3.2.1

MotionEase

Physics-based micro-animations with a single call. Spring curves that feel right without a tuning session.

View →
Aug 19 • v1.9.4

FormFlow

Validation and multi-step logic that works the same in React, Vue and vanilla. Your markup stays yours.

View →

Ship the interface today.

MIT licensed. Commercial friendly. Five-minute setup.