Divan

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
PhoneTabletDesktop
HeaderLogo, language, Support (heart only), menu; links and account in the drawerAdds Sign in / My activity and the Support labelLinks in the bar from 1024px; no menu
FooterBrand, then two columns of groups; Follow spans both with two columns of links; legal row centredBrand and three groups in four columnsThe same, wider gaps
Page width16px gutters20px guttersAt most 72rem, centred
Card gridsOne columnTwo columnsThree or four columns
Side menu (My activity)The sections as one segmented row above the pageFrom 768px a side menu on the start side (right in Persian), with countsThe same, staying in view while the page scrolls
Data tableScrolls sideways inside its card below its minWidth, or shows each row as a card (stack); search full widthFits most tables; search 18remFits; pages or rows drawn as you scroll
Segmented controlScrolls sideways inside its own trackFitsFits
Sheets and dialogsSheets take the full height from the start side; dialogs the width minus the gutterSheets 24rem wide; dialogs 32remThe same
Room panelA full-height bottom sheet over the chat, a step back at its topThe sameFrom 1024px docked beside the chat, which shrinks to what is left
Typedisplay and large-title shrink with the screen and its heightGrow with the screenReach their largest size
FieldsFull width, 16px text (no zoom on iPhone)Side by side in two columns where they belong togetherThe same
ChartsFull width, fewer ticksResize with their cardResize with their card
Bars at the bottomButtons wrap under the count; the page leaves room so nothing hides behindOne rowOne 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.