Freshness
A quiet line under the page heading saying when the content last changed.
On this page
Preview
import { Freshness } from '@govtech-bb/react';
<Freshness>
Last updated on <time dateTime="2026-03-12">12 March 2026</time>
</Freshness>;<p class="govbb-freshness">
Last updated on <time datetime="2026-03-12">12 March 2026</time>
</p>The freshness line tells users how current a page’s content is. It sits under
the page heading, in muted, medium-weight small text, with a rule underneath
that separates it from the content that follows. Do not add
govbb-text-body-sm to it: that class resets the weight to regular.
Wrap the date in a time element with a machine-readable datetime
attribute. In React the whole line is children, so you keep control of the
wording and the date format. Pass inline content only, such as text and a
time element. The line is already a paragraph, so wrapping it in
<Text as="p"> nests one paragraph inside another.
If a page has no date, leave the line out rather than rendering it empty, for
example {updated && <Freshness>…</Freshness>}. An empty line is hidden, but
inside govbb-prose it still sits straight after the heading, so the paragraph
below it loses the heading’s larger gap.
Usage
When to use
- Use it on guidance and information pages where users need to know whether the content is current.
- Place it once, directly under the page heading.
When not to use
- Do not use it on form pages or transactional steps; the date says nothing useful there.
- Do not use it to announce that a page has moved or changed status; use a status banner.
Best practices
Show the date the content changed
Use the date someone last changed what the page says, not the date it was last deployed or rebuilt. A date that moves without the content changing teaches users to ignore it.
Write the date in full
Write dates as day, month in words and year, for example 12 March 2026, so they cannot be misread.