Breakpoints
Tailwind’s defaults, used unmodified:Mobile-first means mobile-first
Write the mobile styles unprefixed, then add breakpoint modifiers:Spacing
The design system publishes a named spacing scale — see design tokens. In Tailwind these are the values reached for most:The spacing layers
Whatever the scale offers, each layer of a screen has a floor. A control keeps 17px of inline padding (12px for a chip, 9px for a pill), a card keeps 21px and a container keeps 28px, adjacent controls sit 9px apart, a label and its field sit 7px apart, a card’s title and its body sit 7px apart, sibling items in a list sit 14px apart, and body text has a 1.5 line height. In the table above,p-3 (12px) is padding, and it is under the 17px control floor, so give a
control its layer’s padding token instead. gap-1 (4px) is a gap, and it is under the 9px gap
between controls, so do not use it between controls. Icon to
text inside one control is not a gap between controls. The rhythm below is a layout guide, not a
licence to go under a floor. See the spacing layers.
Rhythm
Keep vertical rhythm on multiples of 4px:Containers
The standard content container:Full-bleed sections
A section that spans the viewport but keeps its content centred:Grids
Card grid
Sidebar
Stack
Right-to-left
Use logical properties rather than physical ones —ms-4 rather than ml-4, ps-4
rather than pl-4, text-start rather than text-left. A layout built with physical
properties needs a second stylesheet to support Arabic; one built with logical properties does
not.
Mobile considerations
- Touch targets — a 45px hit region on every interactive element on touch, 24px on a desktop with a mouse.
- Thumb zones — put primary actions in the lower half of the screen.
- Bottom navigation —
mzizi-bottom-navfor app-level navigation on mobile. - Sheet rather than dialog — a bottom sheet is easier to reach and dismiss than a centred modal.
- No horizontal scroll — stack instead. The exception is a wide data table, which scrolls inside its own container rather than pushing the page.
- Loading states — show skeletons immediately; on a slow connection the alternative is a blank screen the user reads as broken.