Foundations
Layout and spacing
Space separates groups, so it has to be consistent. Everything sits on Tailwind’s 4px grid, inside one page width.
Rhythm
Inside a row 10–12pxBetween rows 4pxInside a card 18pxBetween groups 24–40pxBetween page sections 48–80px
Page
- Page width 72rem (max-w-page), with a 16px side gutter on phones and 20px from tablets up: the page-container utility does both.
- Reading text stays near 38rem wide (max-w-prose), about 75 characters a line.
- Groups stack in one column on phones and go to two or three columns from tablet widths; a card never stretches over empty space.
- Rows inside a group are 4px apart, so the tone between them reads as one group.
- Use logical sides (ps-, pe-, ms-, start-, end-): Persian pages mirror automatically.
- Everything that scrolls inside a page is relative (relative overflow-y-auto), so what is placed absolutely inside it, such as an sr-only label, scrolls with it and never stretches the page.
Responsive
Phone 360–639px one column, 16px gutters
Tablet 640–1023px two columns, 20px gutters
Desktop 1024px + the header’s links, three or four columns
- Header
- Phone
- Logo, language, Support (heart only), menu; links and account in the drawer
- Tablet
- Adds Sign in / My activity and the Support label
- Desktop
- Links in the bar from 1024px; no menu
- Footer
- Phone
- Brand, then two columns of groups; Follow spans both with two columns of links; legal row centred
- Tablet
- Brand and three groups in four columns
- Desktop
- The same, wider gaps
- Page width
- Phone
- 16px gutters
- Tablet
- 20px gutters
- Desktop
- At most 72rem, centred
- Card grids
- Phone
- One column
- Tablet
- Two columns
- Desktop
- Three or four columns
- Side menu (My activity)
- Phone
- The sections as one segmented row above the page
- Tablet
- From 768px a side menu on the start side (right in Persian), with counts
- Desktop
- The same, staying in view while the page scrolls
- Data table
- Phone
- Scrolls sideways inside its card below its minWidth, or shows each row as a card (stack); search full width
- Tablet
- Fits most tables; search 18rem
- Desktop
- Fits; pages or rows drawn as you scroll
- Segmented control
- Phone
- Scrolls sideways inside its own track
- Tablet
- Fits
- Desktop
- Fits
- Sheets and dialogs
- Phone
- Sheets take the full height from the start side; dialogs the width minus the gutter
- Tablet
- Sheets 24rem wide; dialogs 32rem
- Desktop
- The same
- Room panel
- Phone
- A full-height bottom sheet over the chat, a step back at its top
- Tablet
- The same
- Desktop
- From 1024px docked beside the chat, which shrinks to what is left
- Type
- Phone
- display and large-title shrink with the screen and its height
- Tablet
- Grow with the screen
- Desktop
- Reach their largest size
- Fields
- Phone
- Full width, 16px text (no zoom on iPhone)
- Tablet
- Side by side in two columns where they belong together
- Desktop
- The same
- Charts
- Phone
- Full width, fewer ticks
- Tablet
- Resize with their card
- Desktop
- Resize with their card
- Bars at the bottom
- Phone
- Buttons wrap under the count; the page leaves room so nothing hides behind
- Tablet
- One row
- Desktop
- One row, beside the side menu
| Phone | Tablet | Desktop | |
|---|---|---|---|
| Header | Logo, language, Support (heart only), menu; links and account in the drawer | Adds Sign in / My activity and the Support label | Links in the bar from 1024px; no menu |
| Footer | Brand, then two columns of groups; Follow spans both with two columns of links; legal row centred | Brand and three groups in four columns | The same, wider gaps |
| Page width | 16px gutters | 20px gutters | At most 72rem, centred |
| Card grids | One column | Two columns | Three or four columns |
| Side menu (My activity) | The sections as one segmented row above the page | From 768px a side menu on the start side (right in Persian), with counts | The same, staying in view while the page scrolls |
| Data table | Scrolls sideways inside its card below its minWidth, or shows each row as a card (stack); search full width | Fits most tables; search 18rem | Fits; pages or rows drawn as you scroll |
| Segmented control | Scrolls sideways inside its own track | Fits | Fits |
| Sheets and dialogs | Sheets take the full height from the start side; dialogs the width minus the gutter | Sheets 24rem wide; dialogs 32rem | The same |
| Room panel | A full-height bottom sheet over the chat, a step back at its top | The same | From 1024px docked beside the chat, which shrinks to what is left |
| Type | display and large-title shrink with the screen and its height | Grow with the screen | Reach their largest size |
| Fields | Full width, 16px text (no zoom on iPhone) | Side by side in two columns where they belong together | The same |
| Charts | Full width, fewer ticks | Resize with their card | Resize with their card |
| Bars at the bottom | Buttons wrap under the count; the page leaves room so nothing hides behind | One row | One row, beside the side menu |
Every page is checked at 360, 768 and 1280px in both languages, scrolled to the end: nothing scrolls sideways or runs off the edge, no control covers another, no label is cut short.