Sinth is a declarative language that compiles to pure HTML, CSS, and JavaScript. No runtime library. No virtual DOM. No framework shipped to your users.
Syntax
Logic near UI makes it easy to creative Reactive Content.
page import "components/Navbar.sinth" import SinthUI = "My Sinth Project" = "assets/fav.webp" = "Does this really work?" var str userName Main { Hero { Heading(level: 1) { "Welcome to Sinth" } Input(bind: userName) Paragraph() { "Hello, " + userName } } }
Features
It's like HAML.. just a bit cooler
sinth build --shared-runtime to share one runtime!style lang="scss" and write nested selectors, variables, and mixins. The compiler runs Sass at build time. No loader config required.custom-element syntax. Attributes are typed with defaults. The compiler writes the class for you.sinth dev starts a local server with SSE-based live reload. Edit any .sinth file and the browser refreshes instantly.Comparison
Sinth brings together capabilities that previously required multiple tools, plugins, and configuration files.
| Capability | Sinth | Plain HTML | JSX / React | Vue SFC | Svelte |
|---|---|---|---|---|---|
| Reactive | ✓ | — | ✓ | ✓ | ✓ |
| Declarative syntax | ✓ | — | ✓ | ✓ | ✓ |
| CSS support | ✓ | — | — | ✓ | ✓ |
| SCSS built-in | ✓ | — | — | — | — |
| Two-way binding | ✓ | — | — | ✓ | ✓ |
| Tree-shaken JS output | ✓ | — | — | — | ✓ |
| Custom element syntax | ✓ | ✓ | — | — | — |
| Single-file components | ✓ | N/A | — | ✓ | ✓ |
| Asset pipeline built-in | ✓ | — | — | — | — |
| Error source preview | ✓ | — | ✓ | ✓ | ✓ |
| No build config required | ✓ | ✓ | — | — | — |
| Output is readable HTML | ✓ | ✓ | — | — | — |
| Type-safe attributes | ✓ | — | ✓ (TS) | ✓ (TS) | ✓ (TS) |
| Learning curve | Low | Low | Medium | Medium | Low–Med |
Install
Install the compiler from npm, scaffold a new project, and start the dev server. Your first page renders in the browser before you've had time to configure anything.
Requires Node.js 18+. Powered with TypeScript.
How I see it
Coding should be fun! No exhausting debug sessions for tiny reactive buttons! Using Sinth is super easy. If you know how to deploy HTML sites, you can use Sinth. It's that easy.
The language is designed to describe UI, not switching between three different languages!