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 floor
Whatever the scale offers, nothing goes under 14px of padding between text and its container edge, 7px between adjacent controls, labels and fields and sibling items, or a 1.5 body line height. In the table above,p-3 (12px) is under the inset floor for a text surface, and 1 (4px) is
under the 7px gap floor, so do not use it between controls, labels and fields or list items
(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 floor.
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 49px hit region on every interactive element, on every device.
- 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.