Freshbar
A freshbar is a word-sized gauge of age, built into a date. It lets you see how recent something is, and how it compares to its neighbours, without reading.
With freshbars
The same list, dates only
The problem
Every list on the web has dates: episodes, posts, commits, messages, prices. To understand one, you read it, you work out how long ago that was, and then, to know whether it is new for this list, you read the others too.
Relative dates like "3 weeks ago" save the arithmetic, but you still have to read every one to compare them. Length, on the other hand, you can compare at a glance, which is much of why a bar chart is quicker to read than a table of numbers. A freshbar gives each date a length, in a column, so the comparison happens before you read a word.
Anatomy
- Label
- The date in words. It stays. The bar annotates the date, it never replaces it.
- Channel
- The track under the label, the same width for every date in a list.
- Fill
- How much of the channel has passed. It grows with age, from the left.
- Scale
- What a full channel means. The default is five equal sections: a day, a week, a month, a year, two years.
The scale
The scale is the one real design decision. A linear scale over two years would leave everything from this week as an empty channel, and most lists are dense in the recent past. So each section gets the same length, and time is stretched within it: the first day takes a fifth of the channel, and so does the whole second year.
The channel stays empty for the first five minutes and is full at two years. Inside each section the end of the fill keeps away from the boundary, so "more than a week, less than a month" never sits exactly on a line. When a list has a different rhythm, change the scale, not the idea: a news feed might use an hour, a day, a week, a month.
Principles
- The date stays. The bar annotates the words. Without the words it is a progress bar with nothing to say.
- One width per list. Comparison is the point, and it only works when every channel in the list is the same length and starts at the same x.
- It grows with age. A bar that drains as it gets older reads as loading, or as a battery running out. Time passing fills it.
- Part of the date, not beside it. A gauge next to a date reads as an icon. Under or behind the words, it reads as the date's own.
- The words never sit on the gauge. Leave room between the label and the channel, so neither gets in the way of the other.
- Quiet. It labels content; it must not compete with it. Use the page's own muted colours, no new ones.
- It explains itself. The exact date is one tap away. On a phone there is no hover, so a tooltip alone is not enough.
- No date, no bar. Never draw an empty channel to mean "unknown". An estimated date gets a striped fill.
When not to use one
A single date alone on a page has nothing to be compared with. Future dates need a different idea. Dense data tables, where the column is already sortable and scanned by number, rarely need it. And if the age of things does not matter to the reader, a freshbar is noise.
Choosing a scale
Pick the scale from how far apart the things in your list usually are, so the channels spread out instead of all looking full or empty.
| List | stops |
|---|---|
| Most feeds: posts, episodes, releases | 1d 1w 1mo 1y 2y (default) |
| News, chat, notifications | 1h 6h 1d 1w |
| Archives, references, books | 1mo 1y 5y 20y |
Set --freshbar-width to the widest label your list can show, in your language. In right-to-left pages the channel fills from the right.
Variants
The same component, styled with CSS.
Use it
One file, no dependencies, works in any page or framework.
<script type="module" src="https://eyalev.com/freshbar/fresh-bar.js"></script>
<fresh-bar datetime="2026-09-12T08:00:00Z"></fresh-bar>
<fresh-bar datetime="2026-09-12">12 Sep</fresh-bar>
Empty, it writes the relative label itself ("3 weeks ago") and keeps it current. With your own words inside, it keeps them and adds the channel. Either way, tapping the date shows the exact date and time, a screen reader hears it, and it sits in a real <time> element.
| Attribute | Meaning |
|---|---|
datetime | Required. An ISO date (2026-09-12, 2026-09-12T08:00:00Z), or unix seconds as a bare number. |
stops | The scale, shortest first. Default 1d 1w 1mo 1y 2y (a day, a week, a month, a year, two years). Units: min h d w mo y. |
now | Fix "now", for tests and screenshots. |
| CSS property | Default | What it sets |
|---|---|---|
--freshbar-width | 7.4em | The one width for every bar in a list. Size it to your longest label. |
--freshbar-height | 3px | Channel thickness. |
--freshbar-gap | 2px | Space between the words and the channel. |
--freshbar-fill | text colour, 55% | The part that has passed. |
--freshbar-track | text colour, 15% | The rest of the channel. |
For anything else, style ::part(label), ::part(channel) and ::part(fill). The functions behind it, fillFor and relativeLabel, are exported too, for server-rendered pages. Read the source (MIT).
In use
podqast, a podcast player, shows a freshbar on every episode in its feeds, so a glance down the list says which episodes are new this week.
What is not known yet
That a freshbar makes lists faster to understand is a claim from first principles, not a measured result. A simple test is planned: the same list with and without freshbars, timing "which is newest?" and "is anything from this week?". If you try it on your own site, I would like to hear how it went: hello@eyalev.com.
Written up by Eyal Levin, October 2026.