Project index
Radio filters in an eight-column row over a five-across grid of very round tiles with one-sentence captions; filters hide and show tiles.
Part of the style
Bulging Orb Index
6 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/bulging-orb-index/index/figma.html?type=drifting-print-field
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/bulging-orb-index/index/figma.html?type=drifting-print-field and pass that whole HTML document to the html_to_figma tool, so the part "Project index" lands as editable layers in my open Figma file. Fonts come from Google Fonts: if a face is missing in Figma, pick the closest one.
Code
<style>
/* Goes after the pack's base.css */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@92,800&family=Arimo:wght@400&display=swap");
:root {
--font-body: "Arimo", Arial, sans-serif;
--font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
}
</style>
<section class="index" aria-labelledby="index-title">
<header class="index__head">
<h2 class="index__title" id="index-title">Project Index</h2>
<button class="index__toggle" type="button" aria-expanded="true" aria-controls="index-filters">Filter Index by:</button>
</header>
<fieldset class="index__filters" id="index-filters">
<legend class="index__legend">Show projects tagged</legend>
<label class="index__option"><input class="index__radio" type="radio" name="index-filter" value="all" checked><span>All</span></label>
<label class="index__option"><input class="index__radio" type="radio" name="index-filter" value="animation"><span>Animation</span></label>
<label class="index__option"><input class="index__radio" type="radio" name="index-filter" value="character"><span>Character Design</span></label>
<label class="index__option"><input class="index__radio" type="radio" name="index-filter" value="identity"><span>Brand Identity</span></label>
<label class="index__option"><input class="index__radio" type="radio" name="index-filter" value="packaging"><span>Packaging</span></label>
<label class="index__option"><input class="index__radio" type="radio" name="index-filter" value="print"><span>Print</span></label>
<label class="index__option"><input class="index__radio" type="radio" name="index-filter" value="type"><span>Type Design</span></label>
<label class="index__option"><input class="index__radio" type="radio" name="index-filter" value="web"><span>Web</span></label>
</fieldset>
<ul class="index__grid">
<li class="index__item" data-tags="identity animation">
<a class="index__link" href="#">
<span class="index__tile"><img class="index__photo" src="assets/balloon.jpg" alt="A striped hot-air balloon rising against a red dusk" width="542" height="800" loading="lazy" style="object-position: 50% 30%"></span>
<span class="index__caption">Lift-off identity and motion for <b>Gasbag Air Tours</b></span>
</a>
</li>
<li class="index__item" data-tags="packaging identity">
<a class="index__link" href="#">
<span class="index__tile index__tile--grey"><span class="index__set index__set--serif">Fizzbin</span></span>
<span class="index__caption">A soda in three weathers for <b>Fizzbin</b></span>
</a>
</li>
<li class="index__item" data-tags="packaging print">
<a class="index__link" href="#">
<span class="index__tile"><img class="index__photo" src="assets/liberty-vase.jpg" alt="A wide glazed bowl painted with a face among white roses" width="800" height="570" loading="lazy"></span>
<span class="index__caption">A painted homeware range for <b>Hollow Hill Ceramics</b></span>
</a>
</li>
<li class="index__item" data-tags="character animation">
<a class="index__link" href="#">
<span class="index__tile index__tile--sky">
<svg class="index__toy" viewBox="0 0 200 130" aria-hidden="true">
<rect class="index__toy-shadow" x="58" y="108" width="84" height="10" rx="5" />
<rect class="index__toy-box" x="56" y="22" width="88" height="84" rx="18" />
<rect class="index__toy-lid" x="50" y="14" width="100" height="20" rx="10" />
<path class="index__toy-handle" d="M82 14 C82 0 118 0 118 14" />
<ellipse class="index__toy-eye" cx="82" cy="60" rx="11" ry="14" />
<ellipse class="index__toy-eye" cx="118" cy="60" rx="11" ry="14" />
<circle class="index__toy-pupil" cx="85" cy="64" r="6" />
<circle class="index__toy-pupil" cx="121" cy="64" r="6" />
<path class="index__toy-mouth" d="M84 82 Q100 100 116 82 Z" />
</svg>
</span>
<span class="index__caption">A lunchbox that talks back for <b>Kettle & Kite</b></span>
</a>
</li>
<li class="index__item" data-tags="web animation">
<a class="index__link" href="#">
<span class="index__tile"><img class="index__photo" src="assets/candy-sky.jpg" alt="Bare trees against a pink and violet dusk sky" width="800" height="441" loading="lazy"></span>
<span class="index__caption">Dusk-coloured web and motion for <b>Marrow Radio</b></span>
</a>
</li>
<li class="index__item" data-tags="identity packaging">
<a class="index__link" href="#">
<span class="index__tile index__tile--dark"><span class="index__set index__set--block">LOOPA<small>socks that go round</small></span></span>
<span class="index__caption">Building a sock brand that loops for <b>Loopa</b></span>
</a>
</li>
<li class="index__item" data-tags="packaging web">
<a class="index__link" href="#">
<span class="index__tile"><img class="index__photo" src="assets/stirrup-jar.jpg" alt="A round ringed clay jar with two handles on a dark plinth" width="800" height="800" loading="lazy" style="object-position: 50% 62%"></span>
<span class="index__caption">Labels, jars and a shop for <b>Orbit Jam</b></span>
</a>
</li>
<li class="index__item" data-tags="type print">
<a class="index__link" href="#">
<span class="index__tile index__tile--pop"><span class="index__set index__set--italic">Paper Moth</span></span>
<span class="index__caption">A typeface and stationery for <b>Paper Moth</b></span>
</a>
</li>
</ul>
</section>
<style>
.index {
padding: var(--space-m) var(--edge) var(--section-space);
}
.index__head {
display: flex;
justify-content: space-between;
align-items: center;
}
.index__title {
margin: 0;
font-size: var(--text-m);
font-weight: 700;
line-height: 1;
}
.index__toggle {
min-height: var(--tap);
padding: 0;
border: 0;
background: none;
color: var(--ink);
font: 700 var(--text-m)/1 var(--font-body);
text-decoration: underline;
text-decoration-thickness: var(--line);
text-underline-offset: 3px;
cursor: pointer;
}
.index__toggle:focus-visible {
outline: var(--line) solid var(--ink);
outline-offset: 2px;
}
.index__filters {
display: grid;
grid-template-columns: repeat(8, minmax(0, 1fr));
column-gap: var(--gap);
margin: 0;
padding: 0;
border: 0;
}
.index__filters[hidden] {
display: none;
}
.index__legend {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
}
.index__option {
position: relative;
display: flex;
align-items: center;
gap: 6px;
min-height: var(--tap);
font-size: var(--text-m);
cursor: pointer;
}
.index__radio {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
margin: 0;
opacity: 0;
cursor: pointer;
}
.index__option span::before {
content: "";
display: inline-block;
width: 14px;
height: 14px;
margin-right: 6px;
vertical-align: -2px;
border: var(--line) solid var(--ink);
border-radius: var(--radius-round);
background: var(--paper);
transition: background var(--quick) var(--ease);
}
.index__radio:checked + span::before {
background: var(--ink);
}
.index__radio:focus-visible + span {
outline: var(--line) solid var(--ink);
outline-offset: 3px;
}
.index__grid {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: var(--space-l) var(--gap);
margin: var(--space-l) 0 0;
padding: 0;
list-style: none;
}
.index__item {
transition: opacity var(--time) var(--ease), scale var(--time) var(--ease);
}
.index__item.is-out {
opacity: 0;
scale: 0.92;
}
.index__link {
display: grid;
gap: var(--space-s);
color: var(--ink);
text-decoration: none;
}
.index__link:focus-visible {
outline: none;
}
.index__link:focus-visible .index__tile {
outline: 2px solid var(--ink);
outline-offset: 3px;
}
.index__tile {
position: relative;
display: grid;
place-items: center;
aspect-ratio: 1.55;
overflow: hidden;
border-radius: var(--radius-tile);
background: var(--tile-grey);
}
.index__photo {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
transition: scale var(--time) var(--ease);
}
.index__link:hover .index__photo {
scale: 1.05;
}
.index__tile--grey { background: var(--tile-grey); }
.index__tile--sky { background: var(--tile-sky); }
.index__tile--dark { background: var(--tile-dark); color: var(--paper); }
.index__tile--pop { background: var(--pop-soft); color: var(--pop); }
.index__set {
line-height: 0.85;
text-align: center;
transition: scale var(--time) var(--ease);
}
.index__link:hover .index__set {
scale: 1.06;
}
.index__set--serif {
font-family: var(--font-display);
font-size: clamp(34px, 4vw, 58px);
font-weight: var(--display-weight);
letter-spacing: var(--display-track);
}
.index__set--block {
display: grid;
gap: 6px;
font-size: clamp(30px, 3.4vw, 50px);
font-weight: 700;
letter-spacing: -0.02em;
}
.index__set--block small {
font-size: var(--text-s);
font-weight: 400;
letter-spacing: 0;
}
.index__set--italic {
font-family: var(--font-display);
font-size: clamp(30px, 3.4vw, 50px);
font-style: italic;
font-weight: var(--display-weight);
letter-spacing: var(--display-track);
}
.index__toy {
width: 78%;
height: auto;
transition: translate var(--time) var(--ease);
}
.index__link:hover .index__toy {
translate: 0 -6px;
}
.index__toy-shadow { fill: var(--ink); opacity: 0.18; }
.index__toy-box { fill: var(--paper); stroke: var(--ink); stroke-width: 3; }
.index__toy-lid { fill: var(--pop); stroke: var(--ink); stroke-width: 3; }
.index__toy-handle { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.index__toy-eye { fill: var(--paper); stroke: var(--ink); stroke-width: 3; }
.index__toy-pupil { fill: var(--ink); }
.index__toy-mouth { fill: var(--pop); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.index__caption {
font-size: var(--text-m);
line-height: 1.15;
}
.index__caption b {
font-weight: 700;
}
@media (max-width: 75rem) {
.index__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 56rem) {
.index__filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.index__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
.index__filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.index__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l) 12px; }
.index__tile { border-radius: var(--radius-tile-s); }
}
</style>
<script>
(() => {
const still = matchMedia('(prefers-reduced-motion: reduce)');
for (const root of document.querySelectorAll('.index')) {
const toggle = root.querySelector('.index__toggle');
const filters = root.querySelector('.index__filters');
const items = [...root.querySelectorAll('.index__item')];
const time = still.matches ? 0 : parseFloat(getComputedStyle(root).getPropertyValue('--time')) || 450;
const timers = new Map();
toggle.addEventListener('click', () => {
const open = toggle.getAttribute('aria-expanded') !== 'true';
toggle.setAttribute('aria-expanded', String(open));
filters.hidden = !open;
});
filters.addEventListener('change', (event) => {
const tag = event.target.value;
for (const item of items) {
const show = tag === 'all' || item.dataset.tags.split(' ').includes(tag);
clearTimeout(timers.get(item));
if (show) {
item.hidden = false;
requestAnimationFrame(() => requestAnimationFrame(() => item.classList.remove('is-out')));
} else {
item.classList.add('is-out');
timers.set(item, setTimeout(() => { item.hidden = true; }, time));
}
}
});
}
})();
</script>