Design rules I took from Apple
These are the design rules I took from Apple's apps while redesigning the Fresclean POS. Each one fixed something I could see on a real screen.
Colour and type
- Selection is blue, never black. A black selected tab next to a blue button gives one screen two strong colours that fight.
- Blue text means the link goes somewhere else. When the whole row opens its record, the row's own title stays black, and only a link to something else, like the customer on an order, is blue.
- A link without an underline has to pass contrast on its colour alone. iOS system blue
#007AFFis about 4.0:1 on white, short of the 4.5:1 small text needs. apple.com's#0066CCis about 5.6:1. - Screens pick a named text style, never a pixel size. Each name fixes size, line height and letter spacing together. My app had drifted to 16 sizes, and nine names replaced them.
- Loosen small text and tighten big text. One letter spacing for every size cramps an 11px badge.
- Codes go in the normal font with tabular figures. Apple keeps monospace for code, and tabular figures already line the digits up.
- Lead a row with what people remember. Customers give their name at the counter, not their order code.
- Title Case for things you press and titles, sentence case for everything you read. Buttons, tabs, menu items and status names get capitals. Labels, placeholders, body text, toasts and errors don't.
Words
- One action, one toast. Saving a user used to show "Update user Budi success" and "User stores updated". Now it says "Budi updated".
- Say what happened, then what to do. "Couldn't take photo. Try again." No "please", "may" or "might", and contractions are fine.
- Ask the question, not whether they're sure. "Set status to Ready for Pickup?" beats "Are you sure you want to change the status?"
Shape and surface
- A squircle needs a bigger radius than a round corner, and pills stay round. The CSS
squirclekeyword reads almost square at the same radius. - An inner corner is the outer radius minus the padding between them. A fixed 6px row inside a 15.6px menu looks sharp. Tie it to the radius token so it follows when the token changes.
- Frost needs something behind it to blur. White glass over a white page looks solid, and a big blur wipes out what's behind it.
- In dark mode, cards are grey panels on black, with no border and no shadow. That's how iOS does it.
- Keep alerts narrow and balance the text. Apple keeps them narrow so the question and both buttons read together. A word left alone on the last line is what makes them feel cramped.
Icons, empty states and photos
- Pick the icon for the place, not the nearest name. Swapping icon sets by name gave Queue and Services the same scissors.
- With an outline-only icon set, show the open tab by colour. iOS fills the open tab's icon, and the free Hugeicons set has no filled icons, so the tab turns blue instead.
- Use one empty state everywhere. An icon in a grey circle and a short line, in a card that drops itself inside another card or a sheet, so you never get a box in a box.
- Photos sit on pure black, with controls in frosted circles at the edges. A strip of thumbnails replaces the "1 / 3" counter, and a tap on one jumps to it.
Layout
- Nothing should change shape when a filter or date changes. Columns that quietly disappear are behaviour the user has to discover.
- Use a segmented control only when every option fits at 390px, with no counts. Anything that scrolls, carries counts or comes from data gets pills.
- Reserve room for anything that arrives late. A count that loads after its chip makes every chip beside it slide.
- A layout shift score of 0 doesn't mean nothing blinks. Chrome only counts elements that move, so a page swapped for grey blocks and back scores 0. Compare where things sit as well.
- Key a list by the filter its rows answer. Keyed by id, the old rows get moved into new places when a filter changes, and every move counts as a shift.
- A line that only sometimes has text keeps its height. An empty caption under a chart's total that collapsed would make the chart jump on every tap.
- Measure padding against what you can see. A hidden 4px of room for the focus ring left 12px below a strip against 8px above it.
Charts
- The header shows the range total until you pick a day. With a mouse the day goes in a callout beside the bar. With a finger it stays in the header after you lift it, and a tap elsewhere brings the total back.
- Legends use short codes and skip zeros.
DCS 9 · DCE 5with the full name on hover, and nothing listed at 0.
Process
- Mock it, then build it. A clickable mock is cheaper to throw away than a diff, and I threw away several.
- Borrow from Apple's apps, not apple.com. A marketing page's 17px body text would fit far less on a POS screen than the 14px it uses. The one exception was apple.com's link blue, which passes contrast where system blue doesn't.
- A few lines in the agent's rules file beat a separate design spec. The values already live in the CSS, and a second copy drifts. What agents got wrong was about five rules.
- An override of a token outside a CSS layer has to sit outside the layers too. A rule outside every layer beats any rule inside one, whatever its selector.