smalljs$molSearch⌘ KDocsPlaygroundCompareEcosystemAboutEN
IntroductionGetting StartedIntroductionMental modelGetting StartedFrom TypeScript to view.treeProject StructureToolingEssentialsInstallationViewsState & ReactivityRoutingRenderingTestingDeploymentTroubleshootingDataData FetchingData SchemasGiper BazaMoreShowcaseFrom React, Vue & SvelteCookbookAdvancedPluginsModule metadataOfflineGhost viewsAboutFAQTeamReleasesAPI$mol_button_major$mol_button_minor$mol_string$mol_number$mol_text$mol_paragraph$mol_list$mol_row$mol_link$mol_check$mol_switch$mol_select$mol_scroll$mol_page$mol_pick

Introduction

Coming from React or Vue and nothing makes sense? Read Mental model first: five minutes on where computed, watch, lifecycle hooks and data loading went.

What is $mol?

$mol is a reactive UI framework where you describe what the interface is, and the framework figures out how and when to update it. No virtual DOM, no manual subscriptions, no useEffect. You write components as a tree; $mol renders only what is visible and recomputes only what actually changed.A component has three files:name.view.tree — the declarative layout (a compact tree language)name.view.ts — the behaviour (plain TypeScript classes)name.view.css.ts — typed styles (checked by the compiler)That separation is the whole idea: layout stays readable, logic stays testable, styles stay type-safe.None of the three is required on its own. The tree is a shorthand for structure you can also write by hand: From TypeScript to view.tree builds one component both ways and shows the code the tree compiles to.

Who is it for?

You want a small app that stays small as it grows — the runtime is compact and rendering is virtualized by default.You like types everywhere — even styles are checked by TypeScript.You are tired of wiring reactivity by hand — state in $mol is automatically reactive, like a spreadsheet.

A taste

A counter, in full:1$my_counter $mol_view2 sub /3 <= Count $mol_view4 sub / <= count \5 <= Increment $mol_button6 click? <=> increment?7 sub / <= label \+1namespace $.$$ {2 export class $my_counter extends $.$my_counter {3 @ $mol_mem count() { return 0 }4 @ $mol_action increment() { this.count( this.count() + 1 ) }5 }6}count is reactive: anything that reads it re-renders automatically when it changes. There is no setState, no dependency array, no store to register.

Where to next?

Ready to run something on your own machine? Head to Getting Started and build a working app in under fifteen minutes.
Edit this page on GitHubWas this helpful?YesNoNextMental model
On this pageWhat is $mol?Who is it for?A tasteWhere to next?
Type to search the documentation.