Skip to Content
DocumentationBuild UIConceptsUI Organization

UI Organization

Momen UI is organized in five layers: a client owns each interface, a page or modal hosts it, a component tree structures it, context supplies its data, and composition patterns organize complex layouts.

Clients

A Momen project has one shared backend and multiple independent clients.

LayerScopeWhere you edit it
BackendDatabase, APIs, Actionflows, permissions, AI capabilities — shared by all clientsData, Action, Settings tabs
ClientPages, modals, component trees, frontend state, client-specific UI configDesign tab

The editor header has four top-level tabs — Design, Data, Action, Settings. Design is scoped per client; the other three act on the shared backend.

💡

Clients do not share UI: a page built for Web does not appear in Native App. They share only backend capabilities.

Select the target client in the left sidebar before adding pages or components — it determines the page list, canvas, component tree, and available components.

Pages and Modals

Both are independent UI units in the current client. A page maps to a route; a modal is a floating view opened by an action — for confirmations, forms, detail drawers, and overlays.

AspectPageModal
Opened byRoute or navigationAction trigger
Data sourcePage-level query/subscriptionModal-scoped query/subscription
VariablesPage-scoped temporary stateModal-scoped temporary state
InputPage parameters (passed on navigate)Modal inputs (passed on open)

The home page is the default page shown when the app opens.

Component Tree

A component is a configurable UI unit on the canvas — not an isolated control, but a node in the component tree.

System Components

TypeDescriptionExamples
Basic componentsDisplay or input components without childrenText, Button, Image, Input
Container componentsHold children; control layout, scrolling, context, or visibilityPage, View, List item, Tab View, Conditional View

Custom Components and Code Components

  • Custom components: a saved component subtree reused within the same project. See Using Custom Components.
  • Code components: extend Momen through code, imported before use. See Code Components.
💡

Organize the tree by role: nodes that display content, nodes that lay out children, and nodes that provide context.

Context

The same Text component can show different product names in different list rows because properties bind to the context visible at the current tree position.

Context has two dimensions:

  1. Spatial scope: what data a component can read at its position in the tree.
  2. Temporal scope: what data is available before and after an action runs.

Spatial Scope: UI Rendering Context

ScopeContextSourceTypical binding
Page-levelPage parametersPassed when the page opensDetail page ID
Page-levelPage variablesTemporary page stateFilter keyword, current step
Page-levelPage data sourcePage query/subscription resultShared query across regions
Component-localList itemCurrent row in a Listlist item.name, list item.price
Component-localIndexRow index in a ListRank, row number
SpecialComponent outputInput, selector, etc.Used by other components or actions
💡

For full data binding guidance, see Query and Bind Data.

Temporal Scope: Action Runtime Context

PhaseAvailable dataUse
Before / on triggerCurrent UI context: list item ID, input value, page variablesInputs to API, database, or Actionflow
After responseAPI response, Actionflow output, DB result, upload resultUpdate variables, refresh data, show toast, branch
💡

For the full action context model, see Interaction Model.

Composition Patterns

PatternProblem solvedTypical useKey context / sub-canvas
ViewGrouping and layoutCards, sections, scroll areasChildren laid out inside the view
ListRepeat one UI for many recordsProducts, comments, messagesList item, index
Conditional ViewShow different UI by conditionLogged in/out, roles, empty statesBranch sub-canvases
Tab ViewSwitch peer content areasOrder status, categoriesTab page sub-canvases
Design questionStart with
Group several componentsView
Same structure, many data rowsList
Different UI in one area by logicConditional View
Switch several peer sections on one pageTab View

Field-level options: Layout Components.

Multi-Client

Web and Native App are independent clients with separate pages and component trees. Web breakpoints apply only to the Web client.

Shared across clients: database, Actionflows, APIs, permissions. Reused in UI: custom components (within a project) and code components (across projects), subject to client support and platform limits.

Last updated on