npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

keystone-dashboard-layout-vue

v1.0.0

Published

Vue 3 Responsive & Dynamic Grid / Dashboard layout with drag, drop and resizable actions.

Downloads

35

Readme

CI code style: prettier npm NPM

What this actually is

A Vue 3, TypeScript-native library for building draggable, resizable, responsive dashboard layouts — the kind of thing you'd use to let a user rearrange widgets, charts, or panels on a screen, with drag, resize, responsive breakpoints, multi-select, undo/redo, and collision handling built in.

It is not a data table/grid. If you're looking for sorting, filtering, paging, or spreadsheet-style rows and columns, this isn't that. This is closer in spirit to react-grid-layout or gridstack.js — but for Vue 3, written in TypeScript from the ground up rather than ported from an older codebase.

Why this exists

The most popular Vue option in this space, vue-grid-layout (~7.4k stars), still has no official Vue 3 release — its own GitHub issues show people asking for a Vue 3 alternative as far back as 2022. What filled that gap instead is a handful of independently-maintained community forks (vue-grid-layout-v3, vue3-grid-layout-next, at least one explicitly marked "no longer supported"), with no obvious default among them.

keystone-dashboard-layout-vue is a ground-up TypeScript rewrite built specifically to be the option in that gap with the most complete feature set and the most rigorously tested codebase — not a patch on top of the original Vue 2 source, and now the reference implementation for a shared engine that also powers sibling React and Angular packages in the same family.

Quick start

npm install keystone-dashboard-layout-vue
<script setup lang="ts">
import { ref } from 'vue';
import { GridLayout, GridItem, type TLayout } from 'keystone-dashboard-layout-vue';
import 'keystone-dashboard-layout-vue/style.css';

const layout = ref<TLayout>([
  { h: 2, i: '0', w: 2, x: 0, y: 0 },
  { h: 2, i: '1', w: 2, x: 2, y: 0 },
  { h: 4, i: '2', w: 2, x: 4, y: 0 },
]);
</script>

<template>
  <GridLayout v-model:layout="layout" :col-num="12" :row-height="30">
    <GridItem v-for="item in layout" :key="item.i" :h="item.h" :i="item.i" :w="item.w" :x="item.x" :y="item.y">
      {{ item.i }}
    </GridItem>
  </GridLayout>
</template>

That's a fully draggable, resizable, auto-compacting grid — no other setup required. vue (^3.0.0) is a peer dependency. The same Options-API usage works too — GridLayout/GridItem are plain components, not Composition-API-only.

Using just the grid math, without Vue? keystone-dashboard-layout-core exports the same collision detection, compaction, movement, and alignment functions the components above are built on — zero Vue dependency, no live DOM required, plain data in and out:

import { collides, compactLayout, moveElement } from 'keystone-dashboard-layout-core';

Useful for validating a layout server-side, or building an entirely different UI on the same algorithms.

Features

  • Core layout — grid-unit positioning with automatic pixel conversion, v-model:layout, auto-sizing container (grid-level and per-item autoHeight), visible grid lines, visual alignment guides and magnetic snapToGrid (a real distinction — one shows where edges line up, the other actually moves the item), CSS transform positioning, a generic ILayoutItem<TMeta> for attaching typed consumer data to each item.
  • Drag and resize — drag from anywhere on an item by default; resize from all eight edges/corners with cursor affordance and optional visible handles (showResizeHandles/resizeHandleColor); drag-handle/ignore selectors; bounded dragging; aspect-ratio locking; per-item size constraints; keyboard move/resize (arrow keys / shift+ arrow); a blocked-move feedback event (MOVE_BLOCKED_BY_COLLISION) for shake/flash/toast UI without reimplementing collision detection yourself.
  • Collision and compaction — vertical compaction, preventCollision, horizontal shift, static items excluded from cascades, on-demand compactNow()/rearrange(), collision-safe duplicateItem(id), a pluggable compactor prop for replacing the compaction algorithm entirely.
  • Responsive layouts — predefined layouts per breakpoint, with auto-generation for breakpoints without one.
  • Multi-select and group operations — click/Shift-click/Ctrl-click selection, group move/resize, align/distribute commands (alignSelected/distributeSelected).
  • Multi-grid and drag-and-drop — drag items between independent GridLayout instances (allowCrossGridDrag), and from outside the grid system entirely via native HTML5 drag-and-drop (allowOutsideDrop, outsideDropAccept to reject incompatible drags, a typed-payload helper for the drop event).
  • Editing and lifecycle — a close button, edit-mode toggle, add/remove items without rebuilding the grid, opt-in undo/redo (enableUndoRedo) at committed-change granularity.
  • Styling and customization — border radius, configurable transition duration/easing, a slot for custom drag-placeholder content, automatic RTL support (including resize from every edge, verified in both directions).
  • Persistence — useLayoutStorage/serializeLayout/deserializeLayout for a single saved layout, plus useLayoutPresets for saving and switching between several named arrangements of the same items.
  • Export — exportLayoutAsSvg(), a dependency-free grid-to-image export for a report, thumbnail, or "share my dashboard" feature.
  • Accessibility — keyboard move/resize, aria-roledescription/ role="group" on interactive items, and localizable UI/ARIA strings (ariaLabels) — not a full WAI-ARIA grid/application pattern by design.

Built to a higher testing bar than most projects in this space

Shared engine, three frameworks

This package, keystone-dashboard-layout-react, and keystone-dashboard-layout-angular all build on keystone-dashboard-layout-core for collision detection, compaction, responsive breakpoint math, and the native Pointer-Events-based drag/resize engine — one implementation of the hard parts, not three independently-maintained copies that could drift out of sync.

Documentation

A focused demo app lives in demo/ (npm run demo). The sandbox/ app is a separate, larger test bench used for manually exercising every prop during development.

Donate

If you enjoyed this project — or just feeling generous, consider buying me a 🍺. Cheers!

License

MIT