Principles
The five brand rules behind every Silkware interface, how tokens carry each one, and the few rules the system cannot enforce on its own.
Silkware's interfaces are black and white with one crimson. The page stays quiet so that the action and the product stand out. Five brand rules decide almost everything else in this system. Each one is carried by a token in app/globals.css, so a component that uses the tokens follows the rule without knowing it exists.
Giulia checked the quantities. Luca has to confirm the supplier before the order can ship on Friday.
The dark field is dark in both themes.
Notes on the field use field-muted.
The five rules
1. Black and white, one crimson
--brand is crimson. It marks the action and at most one more thing per screen. In the example above that is the square that waits on a person. It is never a background behind a section, never running text and never decoration.
Carried by --brand and --brand-foreground, and by the bg-brand and text-brand utilities. Crimson also serves as --destructive for errors, so read Colour for how the two jobs are kept apart.
2. Running text is full ink
Anything someone came to read is set in --foreground. --muted-foreground is for notes: dates, legal lines, the quiet half of a statement.
Carried by --foreground and --muted-foreground. The pair is checked at 4.5:1 or better in both modes.
3. Tight corners
Controls are 6px, cards are 12px, full-bleed pictures are square, and nothing is a pill.
Carried by --radius and the rounded-* scale derived from it. See Radius.
4. Tone steps, not boxes
Part a surface from the one beside it with a step of tone, or with a one pixel --border hairline where the step is too weak. Shadows belong only to what floats.
Carried by --muted, --card, --secondary and --border, and by --shadow-*, which is flat for everything that sits at rest. See Elevation.
Open orders
Part the rows from their panel with a step of tone.
Open orders
Don’t draw a heavy box around every group.
5. People at work, or the product
A picture shows the people Silkware serves, their Silkware engineer beside them, or a real piece of the interface. Never abstract texture. This rule lives in the pictures, not in tokens. See Imagery.
What the system does not enforce
Silkware keeps the official shadcn/ui components as they are and reaches the brand only through tokens, the @theme scales and base CSS in globals.css. Where a brand rule needs a class change inside a component, the upstream styling stays. These are the rules that fall in that gap:
| Brand rule | What ships instead |
|---|---|
| Focus is a 2px ring in ink, 5px out | Upstream draws a 3px ring at 50% opacity plus a ring-coloured border. The colour is the brand's, the geometry is upstream's. Plain links do get the brand ring. |
| Floating panels have a 12px radius | Menus, selects and popovers use rounded-md, which must stay 6px for controls, so they are 6px. |
| Dialogs float with a shadow | Upstream puts no shadow on the dialog, only a scrim. |
| Every control is at least 44px tall | Controls are 36px (h-9) on every device, as upstream ships them, which meets the 24px minimum of WCAG 2.5.8. 44px comes where a screen or region opts in with touch-controls, and nothing grows by itself. See Sizing. |
| The secondary button has a hairline | Upstream uses a transparent border. |
| Headings are 600 | Card titles, dialog titles and labels are 500 (font-medium), which controls need. |
| Rendered text uses the brand's type steps | Typeset sets headings on its own scale, links at 500 rather than 600, and inline code at 0.85em of the surrounding text. |
| Control labels carry -0.015em tracking | No tracking is applied. |
| Grey is only for notes | Upstream sets card, dialog and field descriptions in muted text. |
| Press scales to 0.96 and fills wipe in from the left | Upstream nudges a pressed button by 1px and fades colours. --press exists as a variable and nothing reads it. See Motion. |
| Squircle corners | Not applied. corner-shape would also deform circular elements. |
Two colours differ from the brand source on purpose, for contrast. Error text and fills use a deeper crimson in light and a lighter one in dark, so small text passes 4.5:1. The edge of form controls is a darker grey than the brand's own line, so inputs, checkboxes and radios hold 3:1 on every surface. Both are tokens in globals.css; see Colour.
Charts have a related limit: the palest steps of the ink ramp fall below 3:1 against the page, so series are told apart by order and labels, not by contrast alone.
When you build an application on the system, apply these rules yourself where they matter: use text-foreground for paragraphs, keep one crimson mark per screen, and never put crimson behind a section.