Skip to Content

Layout System

Core layout concepts in Momen: box model, positioning, Flexbox, overflow, and Web responsive breakpoints. For the editor fields that map to these concepts, see Design Panel.

Box Model

Purpose: control a component’s physical bounds and spacing.

Think of each element as a box with padding and margin:

PartDescription
ContentText, images, and other rendered content
SizeHow width and height are calculated (see table below)
PaddingSpace between border and content
MarginSpace between this component and siblings

Size Modes

ModeDescription
Pixels (px)Fixed size; does not flex
Fit contentSized by inner content
Percent (%)Share of parent container
Fraction (fr)Proportional share of remaining space

Set min/max width and height to avoid extreme layouts on small or large screens.

PaddingMargin
PaddingMargin

Positioning

Purpose: decide whether a component participates in normal flow and what it is positioned against.

TypeDescription
RelativeDefault. Stays in parent layout flow and follows Flex direction, alignment, and gap.
AbsoluteRemoved from normal flow; positioned with offsets relative to the parent.
FixedRemoved from scroll flow; positioned relative to the viewport.

Relative

Use for most layouts: cards, vertical stacks, horizontal rows, and responsive reflow with the parent.

Absolute

Use when an element must sit at a precise spot inside a parent without affecting siblings — badges, close buttons, overlay decorations.

QuestionAnswer
Positioned against what?Usually the direct parent container
Does it take layout space?No — siblings layout as if it were not there

Fixed

Use for elements that should stay on screen while scrolling — sticky nav, floating action buttons, bottom bars.

Fixed and absolute both use offsets; absolute is relative to the parent, fixed to the viewport.

Layer and Z-index fields: Design Panel · Position.

Flexbox Layout

Purpose: arrange children inside Page and container components.

Layout overview

Pages and Views are containers; relatively positioned children follow the rules below.

Direction

Direction

DirectionDescription
HorizontalChildren along the X-axis
VerticalChildren along the Y-axis

Distribution and Alignment

Distribution

DistributionDescription
Stack (start)Children grouped at the start
Space betweenEqual gaps; first and last flush to edges
Space evenlyEqual gaps including container ends
Space aroundEqual space on both sides of each child; end gaps are half of between gaps

Wrap

When a row (or column) is full, children can wrap to the next line.

Wrap

Gap

Uniform spacing between adjacent children.

Gap

Overflow

Overflow

ModeDescription
ScrollShow scrollbar when content overflows
VisibleOverflow remains visible
HiddenClip overflow

When wrap is off, horizontal and vertical overflow can be controlled separately.

Responsive Breakpoints (Web)

The Web client supports Desktop, Tablet, and Phone breakpoints so one client can adapt layout and style to viewport width.

Desktop is the primary breakpoint. Tablet and Phone inherit Desktop; they are siblings — neither inherits the other.

Breakpoints belong to Web only. Native App is a separate client and does not use Web breakpoints.

ConfigExample
PositionMove a floating button on Phone
SizeFull-width cards on Phone, fixed width on Desktop
LayoutHorizontal on Desktop, vertical on Phone
StyleHide decoration on Phone

Width ranges, override rules, and per-breakpoint hide rules: Breakpoints Reference.

Last updated on