Ledgerline design system · version 1.4
Ruled lines, red margins, numbers that line up.
An operations desk is a ledger that never closes. The system borrows the oldest interface for keeping accounts straight, the ruled book, and turns it into tokens a team can share: one source file, generated into CSS and JSON, used by every screen in the desk and every example on this page.
Start
Five rules the whole team keeps
Decisions get argued once, written here, then built into tokens and components so nobody has to argue them again on a Friday afternoon.
Tabular figures everywhere, money right aligned, totals double underlined. An ops lead scans columns, not sentences.
Rows are separated by thin blue rules, like ledger paper. Cards only where something is truly separate.
Every status has a shape and a word. A colour blind dispatcher at 6pm in a hot office reads the same thing as everyone else.
Compact is three token swaps, not a second set of components. It only applies with a fine pointer, so thumbs keep 44px.
Empty, loading, offline, error and no permission are designed states with copy, not leftovers. Lagos networks drop; the desk must not.
Foundations
Colour
Paper, ink and a red margin. Components only ever use semantic roles, never raw hex, so night shift is a change of values and not a change of code. Each role below shows both modes.
| Token | Day | Night shift | Use |
|---|
Scroll the table sideways for every column.
Data colours were checked as a set with a colour vision deficiency validator, all pairs, in both modes, against the surface they sit on. Status colours are reserved for state and never reused for a chart series.
Foundations
Contrast pairs
The pairings a team must not break. Ratios are computed live on this page from the token values, using the WCAG 2.2 formula. The build refuses to write tokens if any pair falls below its minimum.
| Foreground on background | Day | Ratio | Night shift | Ratio | Needs |
|---|
Scroll the table sideways for every column.
Foundations
Type
IBM Plex Sans for everything people read, IBM Plex Mono for things people copy: shipment IDs, phone numbers, plates, bank references. Plex has true tabular figures and a clear ₦. The scale is tight at the small end because that is where operations software lives.
| Token | Size / line | Weight | Sample | Use |
|---|
Foundations
Spacing
A 4px base with a 2px half step for hairline nudges. Components use the scale; pages use the scale; nothing uses 7px.
| Token | Value | Visual |
|---|
Foundations
Radius
Small. A ledger is a rectangle. Rounder corners are kept for things that float above it.
| Token | Value | Sample | Use |
|---|
Foundations
Elevation
Four levels. Most of the desk is flat on the page; elevation means "this is on top of your work and will go away".
| Token | Sample | Use |
|---|
Foundations
Motion
Motion explains where something went: a resolved exception slides out, a panel slides in from the side it lives on. Durations collapse to 1ms when the reader asks for reduced motion, and live data still updates without animating.
| Token | Value | Try it | Use |
|---|
Foundations
Density
Comfortable for most people, compact for the dispatcher who wants 20 rows on a laptop. Three tokens change; components do not know which mode they are in. Compact is ignored on touch screens so targets stay at 44px.
| Token | Comfortable | Compact | Use |
|---|
Foundations
One source, three outputs
Tokens live in one ES module. A small build script checks every contrast pair, then writes the CSS custom properties and a JSON file in the Design Tokens Community Group format, so a Figma plugin, an iOS app or a rider app can read the same values.
$value, $type and modes.What a component sees
.btn--primary {
background: var(--ll-color-accent);
color: var(--ll-color-accent-fg);
min-height: var(--ll-density-control);
border-radius: var(--ll-radius-md);
transition: background var(--ll-motion-instant) var(--ll-motion-ease);
}Button
One primary action per view or modal. Secondary for everything else, quiet for actions inside dense rows, danger only for things that close a delivery or move money.
Anatomy
- Container:
density-controlhigh,radius-md, 1px border that stays even when filled so widths never jump. - Icon, optional, 14 or 18px, always before the label. Never the only content unless the button has an
aria-label. - Label: a verb, sentence case, two words at most. "Resolve", not "Submit".
Usage
- Say what happens: "Return 4", "Assign rider".
- Keep a no permission button visible, with a lock and a reason.
- Show loading in place, keep the width.
- Put two primaries side by side.
- Hide actions from viewers so they think the desk is broken.
- Use danger red to mean "important".
Accessibility
- Native
<button>, so Enter and Space work for free. - No permission uses
aria-disabled="true", notdisabled, so it stays focusable and a press explains why in a toast. - Loading sets
aria-busy; the result is announced by the toast, not the button. - Focus ring is 2px
focuswith a 2px offset, 3:1 against every surface.
Keyboard
- Tab
- Move to the button
- EnterSpace
- Activate
Code
<button class="btn btn--primary" type="button">Resolve</button> <button class="btn" type="button" aria-disabled="true" title="Only an ops lead can return parcels.">Return</button>
Input
Text entry with a visible label above, a hint below, and an error that says how to fix it. Placeholders give an example, never the label.
Riders find doors by landmark first.
Add a landmark the rider can see from the road.
Anatomy
- Label, 13px medium, always visible, tied with
for. - Field:
border-strongat rest (3:1),focusring plus soft halo on focus. - Hint: what good looks like, in
text-muted. - Error: icon plus sentence, replaces nothing, sits under the hint.
Usage
- Write errors as instructions: "Add a landmark", not "Invalid".
- Validate on submit, then live once a field has an error.
- Use the placeholder as the label.
- Clear what someone typed when the form fails.
Accessibility
- Errors set
aria-invalidandaria-describedbyon the field. - On a failed submit, an error summary with links to each field takes focus and is announced as an alert.
- 16px text on touch screens so iOS does not zoom in.
Keyboard
- /
- Focus the desk search from anywhere
- Esc
- Clear the search
Select
A styled native select. On a phone it opens the system picker, which is faster than anything we could build, and it works with every screen reader without extra code.
Say how the address was confirmed.
Only ops leads and dispatchers assign riders.
Anatomy
- Label above, as for input.
- Field with the chevron drawn in CSS, 36px right padding so long rider names truncate before it.
- Options carry context: name, zone and load, so the choice is made in the list.
Usage
- Sort options by what helps the decision: nearest zone, lightest load.
- Start with "Choose one" when there is no safe default.
- Build a custom dropdown for fewer than 50 options.
- Disable without saying why.
Accessibility
- Native element: role, value and expanded state are exposed by the browser.
- A disabled select points to its reason with
aria-describedby.
Keyboard
- ↑↓
- Change the option
- Alt↓
- Open the list
- A to Z
- Jump to a name
Checkbox and radio
Checkboxes select rows and confirm facts. Radios pick one outcome in a resolve flow. The box is 18px; the hit area around it in a table row is 44px.
Anatomy
- Box: 18px,
border-strong,radius-sm; radios are round. - Mark drawn with a clip path so it scales crisply and inherits
accent-fg. - Label: the whole label is clickable.
- Hit area:
.check-hitwraps table checkboxes in a 44px square.
Usage
- Use indeterminate on "select page" when some rows are picked.
- Offer "select all 287 matching" only after the page is selected.
- Use a checkbox to trigger an action immediately.
- Shrink the hit area to match the box.
Accessibility
- Native inputs with
appearance: none, so state is real, not painted. - Row checkboxes are labelled "Select LL-482313", not "Select".
Keyboard
- Space
- Toggle
- x
- Toggle the focused table row
- ↑↓
- Move between radios in a group
Badge and status
Six delivery statuses and three exception types. Each has its own shape so the badge still reads in greyscale, in forced colours and on a cracked phone screen in the sun.
Anatomy
- Fill: the status
-bgtoken. - Shape icon: tick, cross, arrow, bike, circle, return arrow.
- Word in the status
-fgtoken, at least 4.5:1 on its fill.
Usage
- Show one status badge per row, plus at most one exception badge.
- Use time tags ("Late 18 min") as text, not as badges.
- Invent a seventh colour for a one off state.
- Use status green for "selected".
Accessibility
- Icons are
aria-hidden; the word carries the meaning. - Every fg on bg pair is in the contrast table above.
Keyboard
Not interactive. Badges never take focus.
Table row
The unit of the desk. A shipment row reads left to right as a sentence: who, where, with whom, what state, by when, for how much. Ruled in blue, with the red margin a bookkeeper would draw.
| Select | Shipment | Recipient | Status | Due | Cash on delivery | State |
|---|---|---|---|---|---|---|
| LL-482313 | Bisi Balogun16 Addo Road, Ajah | Out for delivery | Due 15:10Same day | ₦56,000 | default | |
| LL-483903 | Seun Danjuma24 Warehouse Road, Apapa | Awaiting pickup | Due 16:4022 min left | ₦32,400 | hover | |
| LL-483726 | Ngozi Edet134 21 Road, Festac | Failed attempt | Due 11:16Late 196 min | ₦24,000 | selected | |
| LL-482110 | Adaeze Bello55 Agege Motor Road, Oshodi | Delivered | 13:05On time | ₦12,450,000 | open in panel | |
| LL-482163 | Oluwaseyifunmilayo Adebanjo-OkonkwoFlat 4B, Block 12, Adebola Adeyemi-Williams Close, off Third Avenue, Gbagada | Returned | ClosedReturned | Prepaid | long text | |
| Cash on delivery, this page | ₦12,562,400 | |||||
Scroll the table sideways for every column.
Anatomy
- Margin cell: selection checkbox and the red double rule.
- ID in mono, a button that opens the side panel.
- Two line cell: the fact on top, the context under it. Compact density drops the second line.
- Status badge, then the time tag, then money right aligned in tabular figures.
- Footer: totals double underlined, like the bottom of a ledger page.
Usage
- Truncate with an ellipsis and keep the full text in the title and the panel.
- Hide columns by priority as the container narrows, then switch to cards under 640px.
- Let live updates change cells in place, never reorder under the reader.
- Wrap money onto two lines.
- Abbreviate ₦12,450,000 in a table. Abbreviations are for KPI tiles on small screens.
Accessibility
- A real
<table>with scoped headers; sortable headers are buttons insidethwitharia-sort. - Rows use a roving tabindex, so the table is one Tab stop and arrow keys move within it.
- The selected state is a fill and a ticked box, never a fill alone.
Keyboard
- jk↑↓
- Next and previous row
- HomeEnd
- First and last row
- xSpace
- Select the row
- Enter
- Open the shipment
Tabs
Split one list into types without leaving the page. The count travels with the label, so the tab says how much work is behind it.
Anatomy
- Tab: 44px high, label and count.
- Count pill: inverts on the selected tab.
- Indicator: 3px bar in the
marginred, the same red as the ledger rule.
Usage
- Use for peers of one list. Use saved views for filters people build.
- Let tabs scroll sideways on phones.
- Use tabs as page navigation; that is the side nav.
- Nest tabs inside tabs.
Accessibility
- WAI-ARIA tabs pattern:
tablist,tab,tabpanel,aria-selected,aria-controls. - Automatic activation: moving focus selects, because panels render instantly.
Keyboard
- ←→
- Previous and next tab
- HomeEnd
- First and last tab
- Tab
- Into the panel
Toast
Confirms what just happened and offers Undo. It never carries information you cannot find elsewhere, because it goes away.
Resolved LL-482313: try again today, 16:00 to 18:00.
Only an ops lead can return parcels to merchants. You are viewing as Dispatcher.
Anatomy
- Status icon.
- Message: what happened and to what, with the ID.
- Undo, when the action can be reversed.
- Dismiss.
Usage
- Prefer Undo over "Are you sure?" for reversible actions.
- Pause the timer while hovered or focused.
- Use a toast for errors that block work; that is a banner.
- Stack more than three.
Accessibility
- The region is
aria-live="polite", so a toast is read after the current sentence. - Six seconds, paused on hover and focus, so slower readers and keyboard users can reach Undo (WCAG 2.2.1).
Keyboard
- Tab
- Reach Undo and Dismiss, which pauses the timer
- Enter
- Undo
Modal
For decisions that need a few answers before they count, like resolving an exception. Built on the native <dialog>, which traps focus and makes the page behind it inert.
Resolve: payment mismatch
LL-482212 · open 47 min · Ikoyi
Anatomy
- Head: title as a verb and the object, context line, close.
- Body: the context first (what the rider said, the money), then the questions.
- Foot: who is acting on the left, Cancel then the primary on the right.
- On phones it becomes a bottom sheet with full width buttons.
Usage
- Show the facts needed to decide inside the modal.
- Keep the primary label the same as the button that opened it.
- Open a modal from a modal.
- Use one to show read only details; that is the side panel.
Accessibility
showModal()gives a focus trap, an inert background and Esc to close.- Labelled by its heading. Focus goes to the first field and returns to the opener on close.
- A failed submit moves focus to an error summary with
role="alert".
Keyboard
- Tab
- Cycles within the modal
- Esc
- Close without saving
- Enter
- Submit from a field
Side panel
Everything about one shipment, next to the list it came from. On wide screens it pushes the table instead of covering it, so you can keep working down the list with [ and ].
Anatomy
- Head: status, service, previous and next, close; recipient as the title with ID and zone.
- Body: sections ruled with a double line; delivery, cash, timeline, rider, proof, notes.
- Foot: copy ID and jump to the exception.
Usage
- Keep it non modal on desktop so the table stays usable.
- Go full screen on phones, with the page behind it inert.
- Re-render it while someone is typing a note. Live updates skip a panel that has focus.
Accessibility
- A labelled
<aside>; focus moves to its heading on open and back to the row on close. - On phones the rest of the page is set
inert.
Keyboard
- Enter
- Open from a row
- []
- Previous and next shipment
- Esc
- Close and return to the row
Empty state
There are two kinds of empty, and they need different words. "Nothing matches" is the reader's filters; "nothing to do" is good news. Both get a drawing on ledger paper and a way forward.
No shipments match
Nothing in today's book matches status Returned and zone Oshodi.
Queue clear
New exceptions appear here the moment a rider reports one.
Anatomy
- Drawing: a ledger page with a magnifier or a tick, in tokens, so it works at night.
- Title: what is true, in five words or fewer.
- Body: the filters that caused it, in bold, so the fix is obvious.
- Actions: the most likely fix as primary.
Usage
- Repeat the reader's filters back to them.
- Celebrate a clear queue quietly.
- Say "No data". It reads as broken.
- Blank the page during a refresh; keep the old data and say how old.
Accessibility
- The result count above the list is a
statusregion, so "No shipments match" is announced. - The drawing is decorative and hidden from assistive tech.
Keyboard
Actions are ordinary buttons in reading order.
Skeleton
Shown on first load and on slow refreshes. Shapes match what will arrive, so nothing jumps when the data lands. On a normal refresh the old data stays put instead.
Anatomy
- Blocks in
surface-sunken, sized to the real content: label, figure, rows. - A slow shimmer, 1.4s, switched off for reduced motion.
Usage
- Use for waits over about 400ms.
- Vary row widths a little so it reads as text.
- Replace real data with skeletons on every refresh.
- Show a spinner and a skeleton together.
Accessibility
- The container sets
aria-busy="true"while loading; the result count announces when data arrives.
Keyboard
Not focusable.