Information hierarchy
How to order a Silkware screen so the person sees the one thing that needs them first.
A screen is read in a few seconds by someone who is in the middle of work. Silkware screens are ordered so that the first thing they see is the thing that needs them, and everything else is one step quieter. The system gives you few ways to make something louder on purpose: one filled button, one crimson mark, a step of weight, a step of tone. Hierarchy is the discipline of spending each of them once.
Order PO-2417
Waits on Giulia
Bullovia, 12 lines, delivery to Bergamo on 14 December. The total is €18,420.
One idea per section
Give each section of a screen one subject and one heading. If you can not name the section in three words, it holds two sections.
- Put the subject first: the order, the supplier, the delivery. Details, history and settings come after it.
- Start a section with what a person must decide or know, then the evidence for it, then the secondary actions.
- Keep one live thing per section: one table, one form, one chart. A section that holds a form and a table is two sections.
- Hide what is not needed yet. Detail that most people skip goes behind an Accordion or a Collapsible; it is not left out of the page, only out of the first read.
One primary action per view
A view has one default Button, the action the person most likely came to do. Everything else is secondary, outline or ghost, in that order of weight. Put the primary action last in a row, where the eye ends, and keep it to a verb and its object: "Approve order".
- A destructive action is never the primary action. It sits in a menu or behind an Alert Dialog, and the dialog's confirm button is the one default button inside it.
- When two actions are equally likely, the view is asking for a decision that belongs earlier. Split it into steps, or choose one and demote the other.
- A repeated action, such as "Open" on every row, is a ghost or link button. It must not compete with the page's primary action.
Order PO-2417
Waits on Giulia
Bullovia, 12 lines, delivery to Bergamo on 14 December. The total is €18,420.
Name the subject, say what it waits on, show the facts, and end on one default button.
Order PO-2417
NewUrgentBergamoBullovia, 12 lines, delivery to Bergamo on 14 December. The total is €18,420.
Don’t give every element the same weight. Three filled buttons and three badges leave nothing to read first.
The one-crimson rule
Crimson is the brand accent. In the Silkware theme it is --brand, and it is also the error colour --destructive (a deeper tint in light mode, a lighter one in dark, so that small text passes contrast).
- On a screen,
--brandmarks one thing: the one state that waits on a person, shown as the crimson state square. It never fills a section, colours running text or decorates. - Errors use
--destructive. Do not add a brand mark to a screen that already shows an error; the screen then has two reds competing. - If a screen would show several crimson squares, show a count in ink text instead and mark only the first item that needs a person.
Tone steps instead of boxes
Separate regions with a step of tone, not with a border around each one. The tokens that make the steps are --background, --secondary (and --muted), --accent and --card. A border is left for places where a tone step is too weak: the hairline --border, the field edge --input and the table.
- Page ground is
bg-background. A region one step off it isbg-secondary. A card on that region isbg-card. - Do not draw a border around a region that already has its own tone, and do not nest a bordered box inside another bordered box.
- Shadows belong to what floats: menus, popovers, dialogs. Nothing at rest has a shadow.
4 orders wait on Giulia.
2 checks scheduled for Marco.
Part regions with one step of tone and let the spacing do the rest.
4 orders wait on Giulia.
2 checks scheduled for Marco.
Don’t wrap every row and the list around it in a border, and don’t add a shadow to a surface that sits still.
Type steps and weights
Hierarchy in text comes from size and weight together, and from nothing else. No capitals, no letter spacing, no colour. Choose the classes by the role of the text, from Tailwind's standard steps. Typography holds the full table.
| Role | Classes | Use |
|---|---|---|
| Page title | font-heading text-2xl font-semibold | The h1 of an application screen. |
| Section title | font-heading text-xl font-semibold | The h2 that opens a section. |
| Subsection title | font-heading text-lg font-semibold | The h3 inside a section. |
| Card and dialog title | Set by the component | font-heading text-base font-medium. |
| Body | text-sm | Text in an application, labels, table cells. |
| Running text | text-base leading-relaxed | Paragraphs read at length. |
| Caption | text-xs text-muted-foreground | Notes, dates, captions. |
| Figure | text-3xl font-semibold tabular-nums | The number a dashboard card is about. |
| Docs or landing page title | font-heading text-4xl font-semibold | A page that stands alone. |
text-display, text-statement and text-lead are an editorial layer for landing and marketing pages, never an application screen.
- Three weights only: 600 for headings, 400 for text, 500 for controls. Nothing is set bold at 700. Use
font-semiboldfor headings andfont-mediumfor controls. - Running text is full ink (
text-foreground).text-muted-foregroundis for notes: dates, units, the quiet half of a sentence. Never set the paragraph someone came to read in grey. - Skip no step in one block: a section that jumps from a heading to small text with nothing between reads as a gap, not as hierarchy.
- Keep text to 45 to 75 characters a line. In a wide column, limit the width of the text and not the column.
Density
Silkware controls are 36px high by default (h-9), with sm at 32px and xs at 24px, on every device. A screen or region for fingers opts in to 44px with touch-controls. Rows, cards and tables are built for people who scan many items a day.
- Use the default size in forms, and add
touch-controlsto a form people fill in on a phone. Usesmin toolbars and dense rows. Usexsonly inside a row of an already dense table, and never as the only way to do something on a phone. - Keep one density per region. A table with
smbuttons does not sit beside a form withlgbuttons. - Density is not an excuse for removing space between groups. Tighten the inside of a group, never the gap between groups.
Grouping and spacing
Things that belong together sit close; things that do not sit far apart. The spacing tokens carry this so you do not pick pixel values.
| Token | Utility | Use |
|---|---|---|
--pad-x | px-page | The page margin, from 20px on a phone to 64px on a wide screen. |
--gutter | gap-gutter | The gap between columns. |
--section-pad | py-section | The gap between sections of a page. Alone: do not add a divider on top of it. |
--stack-gap | gap-stack | From the head of a section to its content. |
--title-gap | gap-title | From a title to its intro paragraph. |
- Between sections use
py-sectionand nothing else. Inside a section use two gaps:gap-titlefrom the title to its intro,gap-stackfrom the head to its content. - Inside a component use the Tailwind scale (
gap-2,gap-4), which the components already do. - Proximity first, rules second. Reach for a Separator only when two items of the same kind sit in one list and a gap would not show it.
Page anatomy for an application screen
An application screen has four regions. Each has one job, and each is one tone step from its neighbour.
Orders
4 wait on Giulia, 12 are in transit.
PO-2417, Bullovia
PO-2416, Ferrolva Acciai
| Region | Holds | Rule |
|---|---|---|
| Header | The product or organisation, the page title if there is no breadcrumb, one primary action, the account menu. | One primary action. Search and notifications are ghost buttons. |
| Navigation | The sections of the product, as a Sidebar or a Navigation Menu. | One current item, marked with aria-current="page". Sections, not tasks. |
| Content | The subject of the page, in sections. | The only region that scrolls the main flow. One heading level per section. |
| Secondary panel | Details of the selected item, filters, history. | Opens on demand. It never holds the primary action of the page. On a small screen it becomes a Sheet. |
Keep the order of reading the same as the order in the code: header, navigation, content, secondary panel. Do not reorder with CSS in a way that separates the visual order from the order that a keyboard and a screen reader follow.
Status and counts
Status is a word and a mark, never a colour alone. The state square says where an item stands in its flow. A status colour (green, amber or blue, with the crimson of an error) says how a check or an event turned out, and always comes with a word and an icon. See Colour.
| State | Square | Meaning |
|---|---|---|
| Done | Filled ink | Finished, received, approved. |
| Waiting | Crimson | Waits on a person. At most one crimson square per screen. |
| Plain | Outline | In progress or not started. |
| Off | Grey | Switched off or archived. |
- Put the status before the object it describes, on the left, as a square followed by a word: "Awaiting approval".
- Put a count after its label, aligned right and in tabular figures (
tabular-nums), so columns of numbers compare. Only the count that needs a person is in full ink; the rest aretext-muted-foreground. - Do not put a count inside a Badge on every row. Where an item stands in its flow is a state square and a word. A status badge (
success,warning,info) is for the outcome of a check or an event, such as "Passed" or "Saved", and only on the rows that need to be noticed. - Show a count only when it changes what the person does. "12 in transit" is information; "12 items" at the top of a list is noise.
- Awaiting approval4
- In transit12
- Received38
Check a screen
Before you ship a screen, test it with these questions, in order.
- Squint at it. Is there one thing that stands out, and is it the right one?
- Can you point to the one default button?
- Is there at most one crimson mark?
- Does every region differ from its neighbour by tone or space, and not by a box?
- Are all weights 400, 500 or 600?
- Would the screen still make sense in greyscale?