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

@labmgm/patterns

v0.1.3

Published

80 Bauhaus-inspired pattern tiles plus a seedable PatternGrid composer with no-adjacent-repeat algorithm.

Readme

@labmgm/patterns

The 80-tile MGM Laboratory pattern catalog + a deterministic, no-adjacent-repeat grid composer.

npm version

"The pattern is the spice, not the meal." — DESIGN_SYSTEM.md §1

pnpm add @labmgm/patterns

Storybook (Brand / Patterns) · SVG catalog


Quick start

import {
  PatternGrid,
  PatternCorner,
  PatternBanner,
  PatternStrip,
  PatternDado,
  PatternPyramid,
  PatternTriangle,
} from '@labmgm/patterns';

<PatternGrid rows={3} cols={3} seed="hero" />
<PatternGrid rows={2} cols={6} colors={['blue', 'yellow']} seed="banner" />
<PatternCorner placement="top-right" size={3} />
<PatternBanner rows={2} cols={6} />
<PatternStrip tiles={12} tileSize={48} />
<PatternDado tiles={60} />
<PatternPyramid height={5} tileSize={48} />
<PatternTriangle direction="down" height={5} />

Catalog

10 shapes × 8 color schemes = 80 SVG tiles.

| Shape | | | ---------------------------------------------------------------------------------------------- | --- | | arcs · circle · clover · domes · fans · leaves · plus · quads · square · x | |

| Scheme | | | ----------------------------------------------------------------------- | --------------------------- | | blue-on-white · green-on-white · red-on-white · yellow-on-white | colored shape on white | | white-on-blue · white-on-green · white-on-red · white-on-yellow | white shape on colored fill |

Each tile is 100 × 100 px at viewBox, tiles seamlessly when repeated, and works at any rendered size.

Catalog access

import {
  CATALOG,
  SHAPES,
  COLORS,
  SCHEMES,
  getPatternTile,
  getPatternSvg,
  randomPattern,
} from '@labmgm/patterns';

CATALOG['circle-blue-on-white']; // { shape, scheme, fg, bg, svg }
getPatternTile('circle', 'blue-on-white'); // same entry by lookup
getPatternSvg('plus', 'white-on-red'); // raw SVG string
randomPattern(); // any of the 80

Components

| Component | Use case | | -------------------------------- | -------------------------------------------------------------------------------------- | | <PatternGrid rows cols seed> | Compose any N×M grid. Deterministic via seed. No adjacent repeats of shape or color. | | <PatternTile shape scheme> | A single 100×100 tile. | | <PatternCorner placement size> | 2×2 / 3×3 / 4×4 block anchored absolutely to a corner of its parent. | | <PatternBanner rows cols> | Wide banner block (default 2×6). | | <PatternStrip tiles tileSize> | Single-row horizontal strip. | | <PatternDado tiles tileSize> | Thin solid-color Bauhaus strip for footer dividers. | | <PatternPyramid height> | Stepped pyramid — row 1 has 1 tile, row 2 has 2, etc. | | <PatternTriangle direction> | Pyramid with up / down orientation. |

All compositions are decorative (role="presentation", aria-hidden="true").

Determinism

<PatternGrid> is seedable so SSR and client renders produce identical output. Same seed → same grid, always.

<PatternGrid rows={3} cols={3} seed="hero" />        // always the same
<PatternGrid rows={3} cols={3} seed={Date.now()} />  // different on each render

Suggested compositions

// 1. Marketing hero accent
<PatternBanner rows={2} cols={6} tileSize={56} seed="hero" />

// 2. Footer divider
<PatternDado tiles={120} />

// 3. Empty state accent
<ShapeSignature rows={2} cols={2} tileSize={28} seed="empty" />   // from @labmgm/brand

// 4. 404 page
<PatternGrid rows={6} cols={6} tileSize={64} seed="404" />

// 5. Corner accent on a card
<div className="relative">
  <PatternCorner placement="top-right" size={2} />
  <Card>…</Card>
</div>

What to avoid

  • ❌ Wallpapering whole sections
  • ❌ Placing text inside a tile
  • ❌ Recoloring tiles outside the 8-scheme catalog
  • ❌ Animating individual tiles

See also

License

MIT © MGM Laboratory