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

@macrulez/masonry-kit-nuxt

v0.1.4

Published

Nuxt module wrapping @macrulez/masonry-kit-vue: auto-imported <MasonryGrid> and useMasonry, module options for default layout behavior

Readme

Masonry Kit Nuxt

Masonry Kit Nuxt

Nuxt module wrapping @macrulez/masonry-kit-vue: auto-imported <MasonryGrid>/useMasonry, a universal plugin that seeds their option defaults from your nuxt.config.ts, and no manual <ClientOnly> wrapping needed — the component is already SSR-safe on its own, rendering a CSS columns approximation until it can measure for real.

Part of the masonry-kit monorepo.


Features

  • Auto-imports <MasonryGrid> and useMasonry — no explicit import anywhere in your app
  • Module options forwarded through runtimeConfig — direction, columns, rows, minLaneSize, gap, placement, animate, transitionDuration, transitionEasing, ssrColumns, set once in nuxt.config.ts and applied everywhere
  • A universal (server + client) plugin seeds those defaults — most option defaults only matter once the engine exists client-side, but ssrColumns is read directly by <MasonryGrid>'s render function, which runs during SSR too — so the plugin isn't .client-only
  • No <ClientOnly> needed anywhere — <MasonryGrid> renders a CSS columns approximation server-side and switches to the real transform-based layout the moment it measures on the client, in the same frame

When you'd reach for this

You're already on Nuxt and want <MasonryGrid>/useMasonry wired up with zero manual setup — auto-imports, and one place to configure defaults instead of passing the same options at every call site.

  • Passing the same gap/columns to every single <MasonryGrid> on the site gets old — Set them once in nuxt.config.ts and every instance that doesn't override them picks up your project's defaults automatically.
  • You'd rather not remember to import <MasonryGrid> in every component — Auto-imports mean it's just available, the same way Nuxt's own built-ins are.
  • A team member reaches for <ClientOnly> out of habit — There's nothing to wrap; the component already renders a safe SSR approximation and swaps to the real layout after hydration on its own.

Installation

npm install @macrulez/masonry-kit-nuxt
// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@macrulez/masonry-kit-nuxt'],
  masonry: {
    columns: 'auto',
    minLaneSize: 240,
    gap: 16,
  },
})

Requires Nuxt ^3.9.0 || ^4.0.0.

Quick start

Once the module is registered, just use the component — no imports:

<template>
  <!-- <MasonryGrid>/useMasonry are auto-imported -->
  <MasonryGrid :items="items">
    <template #item="{ item }">
      <MyCard :data="item" />
    </template>
  </MasonryGrid>
</template>

See @macrulez/masonry-kit-vue's README for the full <MasonryGrid>/useMasonry API — props, slots, sortable, virtualization, and more.

More examples

What the module does

  1. Auto-imports <MasonryGrid> and useMasonry from @macrulez/masonry-kit-vue — no explicit import needed in your components.
  2. Forwards module options (direction, columns, rows, minLaneSize, gap, placement, animate, transitionDuration, transitionEasing, ssrColumns) into runtimeConfig.public.masonry.
  3. Registers a universal plugin that reads that runtime config and calls setMasonryDefaults(...) — so every <MasonryGrid>/useMasonry use that doesn't pass its own options picks up your configured defaults.

Module options

| Option | Falls through to | | -------------------- | ------------------------------------------------------- | | direction | core's own default ('vertical') when unset | | columns / rows | core's own default ('auto') when unset | | minLaneSize | core's own default (240) when unset | | gap | core's own default (16/16) when unset | | placement | core's own default ('balanced') when unset | | animate | core's own default (true) when unset | | transitionDuration | core's own default (250) when unset | | transitionEasing | core's own default when unset | | ssrColumns | columns/rows (if concrete), else a conservative 2 |

None of these are hardcoded in the module itself — an option you don't set stays undefined all the way through to @macrulez/masonry-kit-core's own default, so a future change to core's default keeps applying automatically for Nuxt consumers too.

Overriding defaults per instance

Module options are the fallback, not a ceiling — any <MasonryGrid :options="..."> prop still wins for that one instance:

<template>
  <MasonryGrid :items="items" :options="{ columns: 2 }">
    <!-- uses 2 columns here, regardless of the module-wide default -->
    <template #item="{ item }">
      <MyCard :data="item" />
    </template>
  </MasonryGrid>
</template>

Documentation & links


License

MIT


💖 Support the project

Open source takes time and effort. If this library saves you time or brings value, consider supporting further development.

Thank you for being part of this journey. ❤️