A mountain weather station page, all Server Components: an article at a readable width, a status badge, the current readings as a description list, and the hourly observations in a captioned table that scrolls inside itself on a phone.
Mount Hood Test Site Reporting Elevation 5,370 ft on the south side of Mount Hood, Oregon.
Snow depth 84 in
Water equivalent 31.2 in
Air temperature −4 °C Hourly observations, December 1 06:00 84 in 31.2 in −4 °C 05:00 84 in 31.2 in −5 °C 04:00 83 in 31.1 in −5 °C
Data: Station 651 hourly feed
Source · recipes/station-summary.tsx recipes/station-summary.tsximport {
Badge,
Body,
BodySmall,
Heading,
Link,
Measure,
Stack,
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TableHeader,
TableRow,
} from '@blocks/design-system'
const observations = [
{ time: '06:00' , depth: '84 in' , swe: '31.2 in' , temp: '−4 °C' },
{ time: '05:00' , depth: '84 in' , swe: '31.2 in' , temp: '−5 °C' },
{ time: '04:00' , depth: '83 in' , swe: '31.1 in' , temp: '−5 °C' },
]
export default function StationSummary () {
return (
<Measure as = "article" size = "lg" marginX = "none" aria-labelledby = "station-summary-title" >
<Stack gap = "md" >
<Stack direction = "row" gap = "sm" align = "center" wrap = "wrap" >
<Heading as = "h3" id = "station-summary-title" >
Mount Hood Test Site
</Heading >
<Badge tone = "success" >Reporting</Badge >
</Stack >
<Body margin = "none" >Elevation 5,370 ft on the south side of Mount Hood, Oregon.</Body >
<dl className = "recipe-datums" aria-label = "Current readings" >
<div >
<dt >Snow depth</dt >
<dd >84 in</dd >
</div >
<div >
<dt >Water equivalent</dt >
<dd >31.2 in</dd >
</div >
<div >
<dt >Air temperature</dt >
<dd >−4 °C</dd >
</div >
</dl >
<TableContainer tabIndex = {0 } role = "region" aria-labelledby = "observations-caption" >
<Table >
<caption id = "observations-caption" >Hourly observations, December 1</caption >
<TableHeader >
<TableRow >
<TableHead scope = "col" >Time</TableHead >
<TableHead scope = "col" >Depth</TableHead >
<TableHead scope = "col" >Water</TableHead >
<TableHead scope = "col" >Air</TableHead >
</TableRow >
</TableHeader >
<TableBody >
{observations .map ((row) => (
<TableRow key = {row .time}>
<TableHead scope = "row" >{row .time}</TableHead >
<TableCell >{row .depth}</TableCell >
<TableCell >{row .swe}</TableCell >
<TableCell >{row .temp}</TableCell >
</TableRow >
))}
</TableBody >
</Table >
</TableContainer >
<BodySmall color = "text-muted" margin = "none" >
Data: <Link href = "#station-651" >Station 651 hourly feed</Link >
</BodySmall >
</Stack >
</Measure >
)
} Mount Hood Test Site
The readings are a plain <dl> styled by the app (.recipe-datums reads the tokens). A label-and-value list this small stays app markup; build richer visuals, such as maps or charts, the same way, composed from these primitives.