Linked month bars
A month-by-month volume timeline built from plain elements where every aggregate row links to the filtered view that produced it — the bar shows the shape, the link does the work.
Reach for it when building
- archive pages grouped by month
- activity history overviews
- usage reports with drill-down
- changelog volume by release window
- content calendars in review tools
<ul class="lmb-list">
<li class="lmb-row">
<a href="#entries-2026-06" data-month="2026-06">June 2026</a>
<div class="lmb-barline">
<div class="lmb-bar" style="--share: 1;"></div>
<span class="lmb-count">12<span class="lmb-vh"> entries</span></span>
</div>
<p class="lmb-cats">8 articles · 3 notes · 1 tool</p>
</li>
<li class="lmb-row">
<a href="#entries-2026-05" data-month="2026-05">May 2026</a>
<div class="lmb-barline">
<div class="lmb-bar" style="--share: 0.583;"></div>
<span class="lmb-count">7<span class="lmb-vh"> entries</span></span>
</div>
<p class="lmb-cats">5 articles · 2 tools</p>
</li>
<li class="lmb-row">
<a href="#entries-2026-04" data-month="2026-04">April 2026</a>
<div class="lmb-barline">
<div class="lmb-bar" style="--share: 0.167;"></div>
<span class="lmb-count">2<span class="lmb-vh"> entries</span></span>
</div>
<p class="lmb-cats">2 articles</p>
</li>
<li class="lmb-row">
<a href="#entries-2026-03" data-month="2026-03">March 2026</a>
<div class="lmb-barline">
<div class="lmb-bar" style="--share: 0.917;"></div>
<span class="lmb-count">11<span class="lmb-vh"> entries</span></span>
</div>
<p class="lmb-cats">7 articles · 4 notes</p>
</li>
<li class="lmb-row">
<span class="lmb-empty">February 2026</span>
<div class="lmb-barline">
<span class="lmb-count">0<span class="lmb-vh"> entries</span></span>
</div>
<p class="lmb-cats">Nothing published</p>
</li>
</ul>
<section class="lmb-view" aria-label="Filtered listing">
<p class="lmb-view-label">Filtered listing</p>
<p class="lmb-view-title" role="status">Pick a month to open the entries behind its bar.</p>
<ul class="lmb-view-items" hidden></ul>
<p class="lmb-view-more" hidden></p>
</section>Colors come from shared theme tokens — --surface, --ink, --border, --accent and friends — so this CSS carries no palette
of its own. Use Runnable file to copy the tokens along with it.
.lmb-list {
max-width: 560px;
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-direction: column;
gap: 1rem;
}
/* Underlined so the heading reads as the way in, not as a caption. */
.lmb-row a {
display: inline-block;
font-weight: 700;
color: var(--ink);
text-decoration: underline;
text-decoration-thickness: 1px;
text-underline-offset: 3px;
}
.lmb-row a:hover,
.lmb-row a[aria-current] { color: var(--accent); text-decoration-thickness: 2px; }
/* A month with nothing in it has nowhere to link and no bar to draw. */
.lmb-empty { font-weight: 700; color: var(--dim); }
.lmb-barline {
display: flex;
align-items: center;
gap: 0.6rem;
margin: 0.2rem 0;
}
/* The count sits beside the bar, never inside it — a short bar has no room
for a label, and moving the label in and out by width is visual noise.
Every bar is a share of the same length (the line minus the room kept for
the count) and never shrinks, so the longest bar stays in proportion. */
.lmb-bar {
flex: none;
width: calc((100% - 2.6rem) * var(--share));
height: 14px;
border-radius: 4px;
background: var(--accent);
min-width: 2px;
}
.lmb-count {
font-size: 0.9375rem;
color: var(--dim);
font-variant-numeric: tabular-nums;
}
.lmb-cats {
margin: 0;
font-size: 0.875rem;
color: var(--dim);
}
.lmb-vh {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
.lmb-view {
max-width: 560px;
margin-top: 1.5rem;
padding: 0.85rem 1rem;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--surface);
}
.lmb-view-label {
margin: 0;
font-size: 0.8125rem;
color: var(--dim);
}
.lmb-view-title { margin: 0; font-weight: 700; }
.lmb-view-items {
margin: 0.5rem 0 0;
padding: 0;
list-style: none;
}
.lmb-view-items li {
display: flex;
flex-wrap: wrap;
align-items: baseline;
justify-content: space-between;
gap: 0 0.75rem;
padding: 0.35rem 0;
border-top: 1px solid var(--border);
}
.lmb-view-kind { font-size: 0.8125rem; color: var(--dim); }
.lmb-view-more { margin: 0.35rem 0 0; font-size: 0.875rem; color: var(--dim); }const listings = {
'2026-06': {
label: 'June 2026',
count: 12,
entries: [
['Scanning a shoebox of 35mm negatives', 'Article'],
['Why my playlists keep getting shorter', 'Article'],
['Fixing stick drift with a toothpick', 'Note']
]
},
'2026-05': {
label: 'May 2026',
count: 7,
entries: [
['A month of one-roll photo walks', 'Article'],
['Album art colour picker', 'Tool'],
['Finishing a 90-hour RPG without a guide', 'Article']
]
},
'2026-04': {
label: 'April 2026',
count: 2,
entries: [
['Tuning a cheap ukulele by ear', 'Article'],
['What lives in my camera bag', 'Article']
]
},
'2026-03': {
label: 'March 2026',
count: 11,
entries: [
['Every boss theme I hummed this winter', 'Article'],
['Cleaning vinyl the lazy way', 'Note'],
['Sorting 4,000 photos in a weekend', 'Article']
]
}
};
const monthLinks = document.querySelectorAll('.lmb-row a[data-month]');
const viewTitle = document.querySelector('.lmb-view-title');
const viewItems = document.querySelector('.lmb-view-items');
const viewMore = document.querySelector('.lmb-view-more');
function openMonth(link) {
const listing = listings[link.dataset.month];
monthLinks.forEach((other) => other.removeAttribute('aria-current'));
link.setAttribute('aria-current', 'true');
viewTitle.textContent = listing.label + ': ' + listing.count + ' entries';
viewItems.replaceChildren(
...listing.entries.map(([title, kind]) => {
const item = document.createElement('li');
const titleText = document.createElement('span');
titleText.textContent = title;
const kindText = document.createElement('span');
kindText.className = 'lmb-view-kind';
kindText.textContent = kind;
item.append(titleText, kindText);
return item;
})
);
viewItems.hidden = false;
const remaining = listing.count - listing.entries.length;
viewMore.textContent = 'and ' + remaining + ' more in the full listing';
viewMore.hidden = remaining === 0;
}
monthLinks.forEach((link) => {
link.addEventListener('click', (event) => {
event.preventDefault();
openMonth(link);
});
});Paste this into an agent to rebuild the pattern from scratch.
Build a month-by-month volume timeline with no chart library: each bucket is a heading link, a horizontal bar, a count, and a breakdown line, all plain elements in a list.
The rule that makes the pattern worth having: every aggregate row links to the filtered view that produced its number. The month heading is a real anchor into the listing filtered to that date range — the bar answers "what does the shape look like" and the link answers "show me those" — so the timeline is navigation wearing a chart's clothes, not a dead-end picture. Keep the heading underlined so it reads as a link at rest, not only on hover. If a row cannot link anywhere, question whether the aggregate belongs on the page.
Bar widths are shares of the maximum bucket (`count / maxCount`, passed as a `--share` custom property), floored with a `min-width: 2px` so a month with one item still renders a visible sliver rather than nothing — an invisible bar next to a real heading reads as a rendering bug. Every bar must be a share of the same length: subtract the room the count needs from the line once (`calc((100% - reserve) * var(--share))`, with the reserve sized to the widest count) and stop the bar from flex-shrinking. A plain `width: 100%` bar in a flex row gets squeezed by its own count while the shorter bars do not, which quietly distorts the proportions.
A month with zero items keeps its row, so the gap in the timeline stays visible, but it gets no bar and no link: the heading is dimmed plain text, the count reads 0, and the breakdown line says nothing was published. The 2px floor is for small counts, never for zero.
Put the count beside the bar in dimmed tabular figures, never inside it: short bars have no room for an interior label, and switching label position by bar width is visual noise. Give the bare number a visually hidden unit ("12 entries") so it makes sense read aloud. Under the bar line, a third dimmed line breaks the count down per category joined with middle dots ("8 articles · 3 notes · 1 tool"), which keeps the categorical detail available without a stacked-bar's legend tax.
In a real app the anchor navigates to the listing route with the date range in the URL. The demo has no second page, so it stands the destination in below the timeline: activating a month marks that link `aria-current`, and a "Filtered listing" panel shows the month, its count (in a `role="status"` line so the change is announced), the first three entries, and how many more the full listing holds. The count in the panel must equal the count beside the bar.
Layout is a flex column of rows with consistent gaps; the bar line is a flex row with the bar and count. No axes, no gridlines, no ticks — the counts are printed, so axis furniture would only restate them.
Every color comes from theme custom properties, and the bars have to hold their contrast against the ground in both light and dark themes.