Skip to content

Phones

The rules every part follows on a phone, and how parts change there.

Most people will meet your product on a phone. These are the rules every Tattva part follows on a touch screen, how the main parts change there, and what you still have to do yourself.

The rules

  • Touch, not width. A phone is a touch screen, so the rules follow the pointer (pointer: coarse), not only the screen width. A narrow desktop window keeps its mouse sizes.
  • Tap areas are 44px. On touch, buttons, pills and small choice controls keep the size they are drawn at and get an invisible tap area at least 44px tall and wide. Rows, tabs, menu items and fields grow to 44px tall. Give a small link the tap class to get the same tap area.
  • Fields are 16px or more. iPhones zoom the whole page when a smaller field takes focus. One rule in tokens.css keeps every field at 16px on touch, including ones you add later.
  • Text is 12px or more. The two smallest sizes rise to 12px on touch, so nothing needs squinting.
  • Nothing is hover-only. Anything that shows on hover has a touch equivalent: it is always visible, or it opens on tap.
  • Respect the notch and the home bar. The page uses viewport-fit=cover. Fixed bars add --safe-bottom (and --safe-top, --safe-left, --safe-right) to their padding.
  • The keyboard is part of the screen. The page uses interactive-widget=resizes-content and dvh, not vh, so a field is never hidden behind the keyboard. Bars fixed to the bottom hide while someone types.
  • Sideways scrolling is the exception. Only tables, code and charts scroll sideways, each in its own labelled region, with a soft fade at the edge that has more.

How the main parts change

Tables as cards

This website on a phone

What you still do

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started