Design guidelines
An OpenThink app lives next to someone's notes and opens on whatever they're holding — usually a phone. These guidelines help your app feel calm, fast and at home in OpenThink, for the owner and for everyone you share it with.
Principles
- **Content first.** The app is the thing people came for. Strip away labels, captions, heavy toolbars and decoration until only what they need is left.
- **Phone first.** Design for one thumb on an iPhone, then let it grow to iPad and desktop. Most people will open your shared link on a phone.
- **Works for everyone who opens it.** The owner, an editor, a view-only visitor and a signed-out stranger all open the same page. Each of them should see something that makes sense.
- **Live, never stale.** Data can change while the app is open. Show the change as it happens instead of asking people to refresh.
Layout
- Use one column on phones; add columns only when the screen is wide enough.
- Keep tap targets at least 44 × 44 pt, with space between them.
- Leave room for the screen's safe areas — the notch and the home bar on iPhone.
- Lock the outer page from scrolling sideways; only your content should scroll.
- Set the viewport: `<meta name="viewport" content="width=device-width, initial-scale=1">`.
Color, type and icons
- Few shades: one main text color and one secondary color. Avoid many different greys.
- A soft background, not a glaring white — and no extra grey frames or drop shadows.
- Use the system font (`-apple-system, system-ui`) so text matches the rest of OpenThink, and check that Vietnamese diacritics render cleanly.
- Use clean line-style SVG icons, not emoji.
Navigation
- **Details open as their own view with a back button**, rather than expanding in place or opening a popup.
- **Keep the view in the URL.** Save the selected tab, year or filter with `think.setParams`, so a refresh keeps the place and a shared link opens the same view. Use `{ push: true }` when Back should return to the previous view.
- Don't use `history.pushState` or `location.hash` — they have no effect in OpenThink.
Full screen
People who can't edit the app open it full screen, like an installed app. A ✕ button appears in the top-right corner for 2 seconds; tapping an empty area brings it back, and Esc always exits.
- Leave the top-right corner free so the ✕ doesn't cover your controls.
- Games and drawing apps that use every tap can take over the button with `think.setExitButton("manual")` — but then give people a clear way to show it (`think.showExitButton()`), or on a phone they can only press Back.
Loading
- OpenThink shows a thin loading bar until your app is ready. Call `think.ready()` as soon as the main content is on screen; apps ready within 300 ms show no bar at all.
- Don't flash the layout while data arrives. If you must wait, show a light placeholder in the shape of the content.
- Load several tables at once with `Promise.all` instead of one after another.
Who's looking
Design one screen for each kind of visitor:
| Visitor | What they should see |
|---|---|
| Owner or editor | Everything, including editing tools |
| View-only or link visitor | The same content, without editing tools — but keep zoom, pan and filters |
| Signed-in, name not shared | The content, plus a "Use my name" button (`think.requestViewer()`) where the app needs it |
| Signed out | The content, plus a "Sign in" button (`think.signIn()`) where the app needs it |
- Hide editing tools with `think.capabilities.canEdit`.
- Don't draw your own "View only" label — OpenThink already shows one.
- Never show a blank or broken screen when `think.viewer` is `null`.
Numbers and dates
- Format numbers with `think.format` and read typed numbers with `think.parse`, so every viewer sees their own style (1.234,5 or 1,234.5). `toLocaleString()` follows the browser, not the viewer's setting.
- Redraw on the `think:locale` event when the viewer changes their setting.
Touch
- For long-press menus, turn off the system's text selection and callout (`user-select: none; -webkit-touch-callout: none`) so a long press on iPad doesn't highlight text.
- Tuck secondary menus away and show them on long press, so the main screen stays clean.
Inside a text page
An embedded app grows to fit its content, or you can fix its height (120–1600 px). Design it to look right at the width of the text column, and keep the first screen useful on its own. Each embedded copy keeps its own state in the page URL, so the same app can appear twice with different settings. See [Embeds](https://openthink.app/n/6eb43cedc7d8).
Checklist before you share
- Looks right on a phone, an iPad and a desktop.
- Opened as a view-only visitor: no editing tools, nothing broken.
- Opened signed out: something useful, and a sign-in button if needed.
- Refreshed in the middle: lands on the same view.
- No emoji icons, no extra labels, no glaring white.
- `think.ready()` is called, and numbers use `think.format`.
Next
- [Build your first app](https://openthink.app/n/ccad28c9424c)
- [Connect your database](https://openthink.app/n/03134f0f5a9f)
- [Authentication, authorization & accounting](https://openthink.app/n/b78dd1e6ad82) — the permission side of "Who's looking"