Magoo Component UI logo Magoo Component UI
← Catalog

Portfolio Grid

portfolio-grid organism experimental

A filterable grid of work tiles with a row of category chips that show or hide projects client-side.

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default
TwoCategories
interiors Studio loft
food Market produce

Props

NameTypeReq
items array ✓
filters array ✓
all_label string
label string

Related components

How to use

behavior.js wires the chips: on click it marks the clicked chip data-active="true" (clearing the others, which drives the data-[active=true]: primary styling) and reads its data-value, then shows only the tiles whose data-category equals that value - an empty value (the All chip) shows everything. It toggles each tile's `hidden` property rather than a `hidden` class so it never clashes with the grid's responsive display utilities, and dispatches a "portfolio:filter" CustomEvent (detail: { value, visible }) after each change. The portable self-init reads all config from the DOM - no props object is passed. Filtering does not run in screenshots (behavior.js is not executed there), so captures show every tile.

Use cases

grid WCAG AA SEO 40 dir: both ai-generated