skip to the page

Building with Loom

This section is about the half of a Loom page that you write.

The other half is the runtime, and it is the same for everybody. What is yours is the vocabulary: the components a page may be built from, the props each of them accepts, how they hold each other, where their words and numbers come from, and which of them an AI model is allowed to touch. Nothing in Loom knows any of that until you say it.

The pages in this section

Primitives and the registry is the one to read first: everything else here assumes you know what those two words mean. After it, the pages can be read in any order.

9 pages, in reading order.

  • Primitives and the registry

    A primitive is a name, a schema and a component. The registry is the allowlist of what a proposal may say.

  • A primitive of your own

    One worked primitive, end to end: the schema, the component, the registration, what a model is told about it, and the tests that prove a person can edit it.

  • Children and slots

    How a primitive holds other primitives: an ordered list of children, and named regions the primitive places itself.

  • Starting from a band

    A whole section of a page — an opening headline, a price list, a list of questions — built by the library and arriving as one change you can review.

  • Where the content comes from

    A node can ask your app a question — for a list, a field, a price — and read the answer beside its props, with a named reason when there is none.

  • Making it look like yours

    A palette, a font pack and a style preset, named by id on the root — and how to get your own brand color into one without shipping a page nobody can read.

  • What AI may change

    The second list you write: which of your primitives matter, how much latitude each kind of asker gets, and the settings that decide it.

  • Testing what you built

    The decisions are pure functions, so proving your policy holds what you meant is an ordinary unit test. The fixtures, the stand-ins and the ready-made suites are all published.

  • Scaffolding from your own code

    The two commands are a wrapper over published functions: one reads the words, one decides what would be written, one writes. A template, a script or a test can stop at any of them.

The trade you are making

A page here can only name components you registered, with props they declared. That is a real loss. You give up building a page out of anything you like, and what you get back is a change somebody can read before it happens: a list of named operations against named components, rather than a diff of generated markup.

The second half of the same trade is worth saying as plainly: behavior lives in the component, not in the tree. A tree can say which component goes where and what text it carries. It cannot say what happens when the button is pressed. That is your code, in your repository, under review the way the rest of your code is.