Hey everyone,
I just released Loom, a library designed to fix the specific architectural headaches that come with building complex Typst packages.
Documentation: leonieziechmann.github.io/loom
If you have built advanced templates, you know the pain of Typst’s linear execution.
- The Aggregation Problem: You want to display a “Total” at the top of the page, but the items (prices, ingredients, points) are defined in the content below.
- The Scope Problem: You want to change a global setting (like language or theme) and have it instantly update a component buried 10 levels deep, without passing arguments through every single function.
- The State Problem: You are tired of fighting with
state(), wrapping everything incontext, and dealing with synchronization issues.
Loom solves this by turning Typst into a reactive engine.
It works by wrapping your document in a feedback loop that allows data to flow bidirectionally (up and down) to resolve dependencies before rendering. (Check the docs if you want to know how this works under the hood).

Here is what that actually looks like in code:
1. Solving the “Shopping List” (Data Bubbling)
You can define data inside your content steps, and Loom makes it available to the parent container before it draws.
// The parent 'recipe' knows the totals before it renders
#show: recipe.with(serves: 4)
// You just write content naturally:
#step(1)[
Preheat oven. Cut #ing.tomato(750) in half.
]
#step(2)[
Add #ing.stock(250) and simmer.
]
// RESULT: The 'recipe' component automatically generates a
// Shopping List and Nutrition Table at the very top of the page.
2. Solving “Prop Drilling” (Context Propagation)
Instead of passing a lang variable to every single helper function, you inject it once at the root.
// Switch to German globally
#show: character-sheet.with(i18n: locale.de)
// Deeply nested components (like a 'strength' stat) automatically
// read this context and render "Stärke" instead of "Strength".
Performance Note:
This reactivity comes with overhead. Follow the “10% Rule”: Use Loom for your document’s skeleton (logic, totals, headers), but stick to standard Typst for the heavy content (body text).
Links: