Duolith documentation
Duolith compiles one set of page files (markup, scoped styles and TypeScript) to a website and to native iOS and Android apps, with no web view on native. These pages still say Duolith, the codename, in commands, package names and file names; the rename to Duolith follows (decision 0161).
---
import { state } from "@duolith/client";
let count = state(0);
---
<screen title="Counter" class="p-6 gap-4">
<text class="text-title">Pressed {count} times</text>
<button
class="px-4 py-2 rounded-md bg-primary text-on-primary"
on:press={() => (count = count + 1)}
>
Press me
</button>
</screen>
Start here
- Styling: utilities, the theme, light and dark.
- Navigation: routes from file names, layouts and the screen stack.
- Data: state that loads, actions, streams and the offline queue.
- Kit: the built-in parts, from Button to TabBar.
- Editors: highlighting, formatting and the language server.
Look things up
- Elements: every element, attribute, event and role.
- Kit parts: every part's props, pieces, states and accessibility.
- Errors and warnings: one page per code, the same text
duolith explainprints. - Glossary: one word per concept.
See it run
Examples has a page per app with its source and how to run it. Start with the gallery, a live demo of every feature, and Features, which says where each one is shown.
Why it is built this way
Principles, the domain and every decision record.