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

@griddle/vue

v0.1.10

Published

Vue 3 bindings for Griddle — a headless, zero-dependency grid/canvas engine.

Downloads

1,607

Readme

@griddle/vue

Vue 3 bindings for Griddle — a headless, zero-dependency grid/canvas engine. Provides a <GriddleGrid /> component and a useGriddle() composable that wrap @griddle/core with virtualized rendering, drag/resize handles, and animations.

Install

npm install @griddle/vue @griddle/core

@griddle/core and vue are peer dependencies. On npm 7+ the peers are installed automatically; with Yarn or pnpm, add @griddle/core yourself (as shown above). vue (>=3.3) is expected to already be in your app.

Usage

<script setup>
import { GriddleGrid, useGriddle } from '@griddle/vue';

const api = useGriddle({
  config: { cols: 12, rows: 12, unitWidth: 75, unitHeight: 75 },
  tiles: [
    { id: '1', col: 0, row: 0, w: 2, h: 2 },
    { id: '2', col: 2, row: 0, w: 1, h: 1 },
  ],
});
</script>

<template>
  <GriddleGrid :api="api">
    <template #tile="{ tile, selected }">
      <div :data-selected="selected">#{{ tile.id }}</div>
    </template>
  </GriddleGrid>
</template>

Explicit reflow

Changing cols through updateConfig() does not relocate tiles. Use the versioned reflow operation when a finite-column change should adapt geometry:

api.reflow({ cols: 4, strategy: 'griddle-v1' });

Griddle has no breakpoint model, and reflow remains separate from pack() and gravity. See the reflow guide.

Animation configuration

Tile repositioning and lift animations share config.animation with the other Griddle adapters. Repositioning defaults to a smooth 320 ms ease-out and rapid repacks continue from each tile's current visual position.

const api = useGriddle({
  config: {
    cols: 12, rows: 12, unitWidth: 75, unitHeight: 75,
    animation: {
      repositionDurationMs: 320,
      repositionEasing: 'cubic-bezier(0.22, 1, 0.36, 1)',
      liftDurationMs: 160,
      liftEasing: 'cubic-bezier(0.22, 1, 0.36, 1)',
      respectReducedMotion: true,
    },
  },
  tiles,
});

Use animation.enabled: false to disable all adapter animations. A duration of 0 disables only that transition.

Loop mode (infinite gallery)

Enable loop in the config and the content repeats endlessly with drag-to-pan physics — no scrollbars:

const api = useGriddle({
  config: {
    cols: 12, rows: 12, unitWidth: 120, unitHeight: 120,
    loop: { enabled: true, interaction: 'pan' }, // 'pan' = viewer, 'edit' = ghost edit
  },
  tiles,
});

<GriddleGrid> automatically switches to the loop renderer when config.loop.enabled is true, so most apps never touch the loop component directly. For advanced cases where you want to render the loop plane explicitly, GriddleLoopGrid is also exported and takes the same props as GriddleGrid:

import { GriddleLoopGrid } from '@griddle/vue';

See the main repository for full docs.

License

MIT © Trustybits