Question that removes something
Rule: a question that removes something focuses Cancel first, the red danger button never gets focus on its own, and Escape or a click beside it cancels.
Every element on this page follows the pm7-layout-rules skill. Each demo names the rule it shows. Try everything with the mouse and with the keyboard.
A small project manager built only from the rules. Outside a field, press N for a new project, F2 to rename the active project and Delete to delete it.
Pick a project to edit its settings.
Two question dialogs and three form dialogs. They act on the active project in the example app.
Rule: a question that removes something focuses Cancel first, the red danger button never gets focus on its own, and Escape or a click beside it cancels.
Rule: a safe question focuses its confirm button, Enter presses the button that has focus, and Tab loops inside the dialog.
Rule: a form dialog focuses its first empty field, a click beside it does nothing, and its template menu opens above the dialog.
Rule: Enter in a one-line field confirms, the buttons are disabled while saving, and a name that is taken keeps the dialog open with the error under the field.
Rule: Escape on a changed form first asks Unsaved changes, with Don't save on the far left, and a click beside that question does nothing.
States that are hard to catch in the app.
Rule: focus only turns the border to the accent color, and the border, padding and text position stay exactly the same, even with a value longer than the field.
Visitors land here after they sign up.
Rule: the error replaces the help text in the same spot, wraps instead of being cut off, and says in words what is wrong and what to do.
This address is missing its domain. Enter a full email address, such as finance@example.com.
Rule: a disabled field and button look disabled and take no cursor, while a read-only field shows a value you can select and copy.
Only an owner can change the workspace ID.
Rule: help text explains behavior or consequences, never where something is, and an option with help text is spaced like a field.
Hides the Git status indicator and stops Git status checks for this project.
Uploads every saved page right away, so the preview link always shows the latest version.
Rule: only the edge that still has content fades, 24px in a normal list and 16px in a narrow column, and a list without overflow does not fade at all.
Long list, 24px fade
Narrow, 16px fade
No overflow, no fade
Rule: a scrollbar shows only its thumb on a transparent track, and the page keeps a stable gutter on a solid background.
Scroll this box. The track shows the background underneath; only the thumb has a color from the theme.
The page itself reserves its scrollbar gutter, so content never shifts sideways between a short and a long page.
The page background is one solid color on html and body, so the strip under the page scrollbar matches the page.
Tab rows are the one exception: they hide their scrollbar and use a fade and chevrons instead.
Rule: a menu for a trigger on the right aligns to its right edge, flips up when it does not fit below and stays 8px from the window edge.
Five distances, chosen by relation, not by eye.
Rule: between elements only 4, 8, 16, 20 and 24 px exist, never 2, 6, 10, 12 or 14.
Rule: when two values seem possible, the relation in this table decides, and every bar below is drawn at its real size.
| Relation | Distance | Real size |
|---|
Rule: distances are measured from the visible bottom of one element to the top of the next, and a heading has more space above it than below it.
Used on invoices and in emails to your team.
Enter a full email address, such as robin@example.com.
Printed on every invoice from the next billing period.
One email a month. You can stop it from any email.
Headings, titles that wrap or cut off, and button shapes.
Rule: headings and dialog titles use text-wrap: balance, so no single word is left alone on the last line.
The heading above breaks into two lines of similar length.
Rule: only a large display title gets slightly tighter letter-spacing and a tight line height, and headings stay upright.
Ship the winter launch
Rule: a title in a card or grid clamps after two lines, and a tab, sidebar row or file name stays on one line with an ellipsis.
Card title
Onboarding email sequence for new workspace owners who signed up through a partner referral link
Tab label
Rule: on a pill the icon sits concentric in the round cap and the text side gets extra margin, but a compact status pill gets no correction.
Rule: primary uses the accent color, danger is red in every theme, the rest is neutral, a disabled button has half opacity, and buttons sit 8px apart.