Content
The read layer — cards, lists, tables, trees and everything else that presents information rather than collecting it. Content components share one surface language: hairline separators, quiet fills, and a single accent that marks selection everywhere.
Card
A bordered surface with optional .b-card__header,
.b-card__body and .b-card__footer regions.
Title and subtitle classes keep the type ramp consistent across
products.
Variants
.b-card--glass blurs whatever sits behind it — reserve it
for cards floating over imagery or color. The header’s trailing
slot takes a button or a status .b-badge.
.b-card--neutral is the one card that does not assume
the page behind it. Its material is a neutral veil, so it lightens a
dark backdrop and darkens a light one by the same step — the same
card over a photograph, a wallpaper or artwork. Put it inside a
wallpaper scope and
the ink follows the backdrop too, as both strips below do.
Media card
Story card (App Store style)
The iOS "Today" pattern: full-bleed art with an
__eyebrow + __title stack laid over a
bottom scrim. Use .b-card--media-overlay with a
__media layer and a __overlay text block.
Icon card
A feature card led by an .b-icon-tile. Add
.b-card--icon so the body stacks and aligns the tile.
Grouped list card (iOS Settings)
The inset-grouped list from iOS Settings: .b-card--flush
removes body padding so a .b-list--plain sits edge to
edge, each row led by a small solid
.b-icon-tile--sm in a system color.
- Wi-Fi Ghala ›
- Bluetooth On ›
- Screen Time ›
- General ›
Cards that end level
Three cards in a grid are already the same height; their bodies are
not, so the button at the end of each one lands wherever the copy
above it happened to stop. .b-card--fill hands the
height down to .b-card__body, and a
.b-spacer before the last row pins it to the floor. A
pricing table is the case this exists for.
Duka
A shop or an office with staff, where more than one person answers the same address every morning.
Get startedIcon tile colors
Solid .b-icon-tile--sm tiles come in the system palette:
--solid (accent), --green,
--orange, --red, --purple,
--teal, --indigo and --gray.
App card
Artwork, name, developer and a tinted pill action — the App Store
row, composed from __art, list anatomy and a
.b-btn--tinted .b-btn--pill.
List & List Item
iOS-style grouped list. Each .b-list-item slots a leading
icon, a content column with title and subtitle, trailing detail text
and an optional chevron. Add .b-list-item--interactive
for hover feedback and .is-selected for the accent wash.
-
09:41Amina HassanCustoms forms for the Dar es Salaam container
-
ActiveParcel BR-2609Out for delivery — Westlands, Nairobi
-
3Baraka MwangiRequested a pickup in Mombasa
Inset dividers
.b-list--inset-divider starts each hairline at the text
edge instead of the container edge — the Settings-app look.
-
OnNotifications
-
Dar es SalaamDefault warehouse
-
KiswahiliLanguage
<ul> of <li> — so screen readers
announce position and count. When a row navigates or triggers an
action, wrap the row content in an <a> or
<button> rather than putting a click handler on the
<li>; the chevron is decorative and stays
aria-hidden.Rows that do something
A row that navigates is an <a>; a row that acts is
a <button>. .b-list-item resets the
browser's button chrome itself — the face, the border, the centred
text — so a list of actions does not render as a column of grey
slabs. Nothing to state at the call site.
.b-list-item--top is for rows taller than one line: it
lifts the leading mark and the trailing stack up beside the first
line instead of centring them against three. A mail row is the case
it was drawn for.
The second row is a real <button>. It is
indistinguishable from the anchor above it, which is the point.
List Header & Footer
iOS grouped-list captions: an uppercase .b-list__header
above the group and a quiet explanatory
.b-list__footer beneath — the Settings-app pattern for
telling people what a group does.
- New mail
- Mentions
Long lists
Three strategies, and a rule for which is which. A console
paginates: somebody is looking for one row and wants to say
"page 4" (Pagination). A
feed loads more: somebody is reading down and wants it to keep
going. Never both on one surface. Under either,
.b-list--virtual (and .b-table--virtual)
lets a five-thousand-row list lay out only what is on screen:
content-visibility skips the rows nobody can see and
the --b-row-h knob says how tall they would have been,
so the scrollbar is honest. No script, no windowing library.
.b-load-more is the sentinel at the end of a feed: a
button, or with data-b-load-more an observer that
fires b:loadmore when it scrolls into view. Your
handler appends rows and calls Barua.loadMore.done(el),
or Barua.loadMore.end(el) when there is nothing left;
the sentinel shows .is-loading and .is-end
for itself.
- Amina MushiContainer quote, Dar to Mwanza09:41
- Baraka ChachaKariakoo stall photos09:12
- Zanzibar FerriesE-ticket ZNZ-88214 confirmed08:03
- CRDBStatement for AugustFri
- Neema KileoInvoice 1042, paidThu
- Precision AirBoarding pass, PW 412Thu
That is everything.
Description List
Label–value pairs on a two-column grid. Use for read-only detail
panes; switch to .b-dl--stacked in narrow columns.
- Full name
- Amina Hassan
- Route
- Dar es Salaam → Zanzibar
- Vessel
- MV Kilimanjaro IV, deck 2
- Booking reference
ZNZ-88214
Stacked
- Warehouse
- Ubungo, Dar es Salaam
- Manager on duty
- Juma Ally
- Cut-off for same-day dispatch
- 14:30 EAT
GroupBox
SwiftUI's GroupBox for the web: a quiet, labeled
enclosure for related content — softer than a card, and it nests
(a nested box flips back to surface so depth stays readable).
Labeled Content
SwiftUI's LabeledContent: the standard label-left,
value-right row for settings and detail screens. Rows separate with
hairlines automatically; the label takes an optional
small second line.
Table
Wrap every .b-table in a .b-table-wrap so it
scrolls horizontally instead of breaking the page. Sortable columns
put a .b-table__sort button inside the header cell;
.is-asc / .is-desc flip the arrow. Numeric
columns take .b-table__num for right-aligned tabular
figures.
| Seats | Fare (TZS) | ||
|---|---|---|---|
| Dar es Salaam → Zanzibar | Today 15:45 | 64 | 35,000 |
| Nairobi → Mombasa | Today 20:35 | 118 | 58,500 |
| Arusha → Moshi | Tomorrow 07:10 | 42 | 12,000 |
| Dodoma → Dar es Salaam | Tomorrow 09:00 | 51 | 41,000 |
Striped & compact
| Manifest | Destination | Parcels |
|---|---|---|
| MAN-1182 | Kampala | 240 |
| MAN-1181 | Kigali | 96 |
| MAN-1180 | Mwanza | 311 |
| MAN-1179 | Tanga | 57 |
scope="col" (or scope="row" for row headers)
so cells announce with their headers. Sortable headers keep the
<button> inside the <th> and
mirror the state with aria-sort on the header cell — the
arrow glyph alone is not announced.Stacked table for phones
A table with a prose column has no good phone shape: at
min-content a Notes column becomes twelve lines of three words, and
scrolling sideways hides the column that matters.
.b-table--stack turns each row into a block under 40rem,
with the column heading written before every cell from a
data-label on the cell. The cells stay table cells for
assistive technology; only their display changes.
--b-table-label-w sets the label column (34% by
default). Data grids never take this: numbers want columns.
| Setting | Default | Notes |
|---|---|---|
| Retention | 90 days | Mail older than this leaves the hot store for the archive; a search still finds it, a little slower. |
| Attachment limit | 25 MB | Above this the composer offers a link from Storage instead of an attachment, which is what the recipient's server would have forced anyway. |
Data Grid
Add .b-datagrid to the table wrap for a scrolling body
with a sticky header — height comes from the
--b-datagrid-h custom property. Row actions in a
.b-row-actions span stay hidden until the row is
hovered or a control in it takes focus; on touch screens they are
always shown.
| Invoice | Customer | City | Amount (TZS) | Actions |
|---|---|---|---|---|
| BR-2610 | Amina Hassan | Dar es Salaam | 240,000 | |
| BR-2609 | Baraka Mwangi | Nairobi | 96,500 | |
| BR-2608 | Neema Joseph | Zanzibar | 57,000 | |
| BR-2607 | Juma Ally | Mombasa | 183,200 | |
| BR-2606 | Khadija Omar | Arusha | 44,000 | |
| BR-2605 | Eric Otieno | Kampala | 128,750 | |
| BR-2604 | Fatma Said | Dodoma | 72,300 | |
| BR-2603 | David Kimani | Kigali | 210,000 | |
| BR-2602 | Zawadi Okello | Moshi | 39,900 | |
| BR-2601 | Grace Wanjiru | Tanga | 65,400 |
opacity, never visibility or
display, so they stay in the tab order and the row
reveals them on :focus-within. For anything destructive, also expose
the same actions through a persistent overflow menu so they are
discoverable without a pointer.Tree
Nested <details> elements with the
.b-tree-item class — branches expand natively, no
JavaScript. Leaves are plain .b-tree-item__row divs
indented to align with branch labels.
-
Reports
-
Q3 2026
-
nairobi-sales.numbers
-
zanzibar-routes.pdf
-
-
annual-summary.pdf
-
-
Archive
-
2025-manifests.zip
-
Timeline
A vertical sequence of events. Mark finished steps
.is-complete (filled accent dot) and the current one
.is-active (accent ring); untouched steps stay gray.
-
Mon 24 Aug · 08:12Order placedAmina Hassan paid TZS 240,000 via mobile money.
-
Mon 24 Aug · 16:40Packed in Dar es SalaamTwo parcels sealed at the Ubungo depot.
-
Wed 26 Aug · 06:55In transit to NairobiCleared Namanga border, ETA tonight.
-
PendingDeliveredSignature required on arrival.
Feed
Avatar-plus-bubble rows for comments and activity streams. The bubble
is a bordered surface; .b-feed__meta carries the
byline.
Accordion & Disclosure
A .b-accordion stacks details.b-disclosure
panels with hairlines between them — native open/close semantics and
keyboard support for free. Use a lone
.b-disclosure--plain for an inline “show
more”.
How long does delivery to Zanzibar take?
Which cities do you cover?
Can I change the delivery address?
Plain disclosure
Show advanced options
Badge
Small status labels. --dot prefixes a colored point,
--count is the red numeric pill, and
--solid fills with the accent for maximum emphasis.
Tag & Chip
Tags are quiet, outlined metadata — never click targets. Chips are
interactive: real buttons that toggle with
.is-selected (or aria-pressed) and can
carry a .b-chip__remove affordance.
Avatar & Avatar Group
Initials on the accent-soft fill are the built-in fallback — no
broken-image state, ever. Sizes run --xs to
--xl; --square suits workspaces and files,
--online adds the presence dot.
Group
Icon
.b-icon is a sized slot for any inline SVG — it inherits
currentColor, so icons re-tint with their context.
.b-icon-tile wraps one in the rounded accent square used
across settings lists and feature grids.
Image
.b-img rounds and crops; --framed adds a
soft elevation shadow. .b-figure pairs an image with a
quiet caption. Gradients stand in for photography below.
Code Block
Always dark, regardless of theme. The header slot names the file and
hosts a .b-code__copy button — point
data-b-copy at the id of the <code>
element and Barua handles the clipboard.
npm install barua-ui
# or just link the stylesheet
<link rel="stylesheet" href="css/barua.css">
Quote
Accent-washed pull quote with an inline-start rule. Keep the
<cite> inside the blockquote for attribution.
Barua turned a two-day paperwork run into an afternoon. We clear a full container out of Dar es Salaam before lunch now.
Khadija Omar — Operations lead, Mombasa
Statistic
Big tabular-numeral values with a label and an optional delta.
.is-up renders green, .is-down red — pick
metrics where the direction matches the sentiment.
Empty State
Centered icon, headline, one supportive sentence, one action. Never leave a blank pane — tell people what belongs here and how to start.
When you book a pickup or send a parcel, it appears here with live tracking from depot to doorstep.
Rich Media & Text
Video and audio players live on the
Media page. For rendered markdown and rich
text, Barua’s base typography does the work — headings,
paragraphs, inline code, quotes and lists inherit the ramp, so a
.b-card__body is all a prose container needs.
Shipping to Zanzibar
Parcels bound for the islands route through the
ZNZ depot and cross on the afternoon ferry from Dar
es Salaam.
Book before 13:00 EAT to make the same-day crossing.
- Stone Town — same evening
- Nungwi and the east coast — next morning
- Pemba — every Tuesday and Friday