Skip to content

Layout types

Read as Markdown

Pibbl layout is opt-in and immediate-mode. Parents inspect normalized direct-child styles, resolve finite allocations, and render one child descriptor at a time; they do not retain drawing commands. Style is local and never cascades.

AbsoluteStyle is the declared container style for Absolute, including its finite box and the independent left/top placement vocabulary for children.

measureBaselines receives readonly resolved props, normalized style, the final local content allocation (x:0, y:0), and the pure Canvas measurement service. The first experimental consumer is a direct fixed primitive in a finite LTR or RTL nowrap row or row-reverse with alignItems: "first-baseline". Queries run after main allocation.

Returns { status: "measured", first, last } with finite ordered logical offsets from the content box’s top edge, or { status: "unsupported", reason }. Negative and out-of-box offsets are preserved. The first alignment consumes first; the result contract always supplies both offsets. A missing capability uses the content bottom edge. A declared provider that fails does not take that fallback. See the baseline example.

BoxStyle is the shared declared-box vocabulary: dimensions, min/max limits, padding, layout borders, and the local inputs needed to resolve a finite box. Its optional boxSizing policy defaults to "content-box"; "border-box" includes padding and layout borders in dimensions, min/max and Flex basis. Percentages resolve before combined insets are subtracted, and the outer border-box size floors at total axis padding plus borders. Painted strokes remain independent. See resolveBox.

CanvasMeasurementService supplies the caller-owned Canvas measurement operations used by pure measurement; they cannot render or acquire runtime resources. Existing measureText(text, font) remains available. Optional measureTextAtBaseline(text, { font, textBaseline }) returns ordinary Canvas TextMetrics for that exact font/baseline state and restores the host context. Text baseline providers require this capability and a finite alphabeticBaseline; absence is an explicit unsupported result, rather than a guessed font offset. The measured coordinate is local to the final content allocation.

Constraints defines finite minimum and maximum width/height limits for layout resolution and pure measurement.

Edges is the normalized finite top/right/bottom/left edge record.

EdgeValues<T extends number | Percentage = number> supplies one scalar or independent physical edges; omitted sides resolve to zero. padding uses EdgeValues<number | Percentage>. Native allocated Flex children and mounted own-style Flow, Grid, Absolute and Overlay resolution use the containing owner width for every padding percentage, including top/bottom, before border-box conversion. Unallocated pure measurement and upstream child preparation without that owner remain unsupported. Layer’s own raster sizing ignores layout padding and borders, keeping its explicit dimensions and child origin. borderWidth and normalizeEdges keep numeric defaults. Compare allocated padding.

Immutable sizing bound returned by fitContent. Its limit is a nonnegative finite number or parent-axis percentage; its private brand prevents ordinary records from impersonating the value.

Optional numeric aspectRatio is outer width divided by outer height for finite Flex items, including wrapped lines. Final per-line main allocation derives cross size, overriding explicit cross size and stretch; cross bounds may break the ratio. Supply a definite main dimension or basis. Intrinsic main sizing, other layout families and root ratio sizing remain outside this contract.

FlexItemStyle is the direct-child participation style consumed by a Flex parent; it does not create a CSS cascade.

In native layout, a primitive leaf in a finite LTR or RTL Flex of any main direction and wrapping mode may choose position: "static" or "relative". Static retains its ordinary Flex slot and ignores insets. Relative retains that slot, then applies left/right/top/bottom once to final geometry. Numbers stay physical; percentages use parent content width for left/right and height for top/bottom. LTR prefers left over right, RTL prefers right over left, and top takes precedence over bottom. Omitting position preserves the existing Flex placement rules. This bounded feature resolves relative percentages against parent content width/height. A direct fixed Flex owner also supports wrapped parents when it remains internally nowrap, declares finite numeric width/height, zero grow/shrink and auto or omitted basis. Other layout families remain outside this admission.

Native direct Flex children in any main direction and wrapping mode may also select position: "absolute" with finite numeric or percentage width/height or automatic/omitted axes paired with both finite physical insets on each automatic axis. With a positive finite aspectRatio, exactly one automatic axis may instead derive from the declared finite numeric or percentage opposite axis. Both-automatic and both-explicit ratio cases remain outside this admission. This excludes the child from Flex line allocation while preserving authored paint/target/focus order. Insets reference the parent’s inner border edge; padding does not shift an explicit inset. LTR prefers left, RTL prefers right, and top takes precedence over bottom. An axis with no inset uses parent content-box alignment via justifyContent or alignItems; stretch leaves fixed height at cross-start. For a paired automatic axis, the remaining padding-box extent after both insets becomes the used dimension and a negative remainder clamps to zero. That pair wins over aspect derivation. Otherwise the resolved declared opposite outer axis derives the automatic outer axis before bounds. Neither path invokes intrinsic measurement. Finite numeric or percentage min/max bounds then clamp used axes independently before physical-inset precedence places them; bounds do not recouple an aspect ratio. A numeric minimum above its maximum rejects; automatic bounds remain outside this admission. Absolute percentage sizes and bounds use the selected padding-box width/height before aspect sizing or pure fixed-axis provider queries. Direct layout children, child box decoration, margins and nonzero flex factors remain unsupported, along with general nested containing blocks. Unpaired automatic sizing requires the documented aspect or paired-provider path.

FlexMargin = number | Percentage | "auto" describes physical and logical margin edges and the uniform margin shorthand. Specific physical edges override the shorthand; logical edges override their resolved physical edge. Experimental finite Flex supports main-axis auto margins in all four directions and LTR/RTL. Physical left/right apply to rows; top/bottom apply to columns. Inline start/end map through the receiving direction and support row main-axis auto margins. Auto edges are zero during flexible sizing, then each actual nowrap/wrapped line divides its positive remaining main space among its own auto slots before justifyContent. With no positive space they remain zero and existing main alignment applies. Finite nowrap/wrapped rows and columns support physical/logical cross auto with an explicit numeric child cross size, including reverse/RTL and wrap-reverse, excluding aspect sizing. Cross auto overrides alignment and uses the item’s own line cross size. Automatic child cross size has a bounded direct Text exception: generic wrapped Text at declared numeric width in a finite nowrap row may use automatic height, with visible/default fit/overflow and no aspect sizing or query. Other automatic cross sizes and pure intrinsic auto margins remain unsupported; the normal build retains its experimental-margin diagnostic. Numeric/percentage precedence is unchanged.

FlexProps accepts recursive PibblNode children for Pibbl’s supported Flexbox subset.

FlexStyle is the declared container style for Flex. Reverse/reordered flexing, advanced intrinsic sizing, margins, and scrolling are outside the normal build. Experimental finite allocated Flex accepts gap, rowGap, and columnGap as number | Percentage. Column percentages use content width; row percentages use content height, including column Flex. Intrinsic/max-only percentage-gap owners remain unsupported.

The experimental alignItems: "first-baseline" aligns direct primitive leaves with settled finite content boxes in a finite LTR or RTL nowrap row or row-reverse after final allocation. Existing width/basis solving, final-width ordinary or paired-provider cross measurement, and acyclic aspect sizing settle that box before the baseline query. Unsupported required measurement fails; authored numeric basis/height is not an additional prerequisite. Direct settled leaves can use responsive styles already selected from the current finite Flex content box; baseline queries consume that selection without re-evaluating rules at their own allocation. Query results are not retained. Intrinsic/recursive query resolution remains unsupported. See BaselineMeasureInput and the first-baseline example. Other baseline modes remain outside this first subset. A bounded wrapped profile also admits horizontal row/row-reverse in LTR/RTL with wrap or wrap-reverse, all existing line-distribution policies, finite resolved gaps, and fixed numeric primitive providers or bottom-edge fallback, finite Text content boxes, main grow/shrink and resolved numeric or automatic main margins. Finite signed numeric cross margins contribute to line ascent/descent without changing provider content size. Automatic cross-margin leaves opt out of baseline sharing and queries, contribute outer height to their line, and absorb its positive allocated free space, including stretch; all-automatic lines use maximum outer height. Static/relative placement composes after baseline allocation; relative offsets move paint and hit geometry without changing provider size or following lines. Fixed padding/borders preserve content-sized provider queries and lift the result by the top content inset before outer-box placement; Text paint and glyph targets use the same content origin. A transparent defineLayoutComponent forwards its one prepared primitive root’s baseline without adding an origin. Provider dependencies and cache replay use the actual root receiver; only complete scalar snapshots of wrapper/root inputs may reuse results. A settled finite Flex, Flow or Grid root selects its first in-flow source child, skipping absolute decoration and adding the child’s pre-relative physical layout-y origin and top content inset. All four inner main directions use that same physical-y contract. Empty containers use their content bottom. Transparent primitive/Flex/Flow/Grid roots and recursively selected prepared Flex/Flow/Grid children preserve the actual root receiver and allocation. Selected relative offsets move paint/hit/focus after baseline placement without changing the contribution. Wrapped Flex roots preserve first-source selection through current native first-line membership and physical line origin, including wrap reversal; empty wrapped roots use content bottom. Static Flex owners and transparent descriptions of actual static Flex roots preserve the nearest non-static ancestor’s absolute containing box: native in-flow allocation supplies the baseline first, and absolute descendants finalize only after the outer origin settles. Nested static chains retain existing nowrap/fixed-chain positioning bounds. Pending plans cannot be claimed or cached; failure releases them and a fresh mount can recover. Stable direct trees reuse completed allocation on unrelated paint, while regenerated described static trees may repeat native allocation. Yoga includes selected relative offsets in structural contributions; Pibbl deliberately retains the pre-relative paint/hit contract described above. Flow uses its current source-order native placement, in either direction with or without wrapping. Its first source is measured at the actual content allocation and physical y, including padding; empty Flow uses content bottom. Native Flow starts its first line at source record zero, so this adds no inferred line graph or second layout. Direct Flow child positions remain unsupported. Grid selects its first declared child even when a later child occupies an earlier visual row. The prepared cell supplies physical y and actual content allocation, including spans and padding; empty Grid uses content bottom. This source-order policy does not promise CSS Grid baseline parity. Outer columns resolve first-baseline to ordinary logical flex-start for every existing direction and wrapping mode, without querying providers or forming a vertical baseline group. Experimental alignItems: 'last-baseline' uses the existing provider’s last offset for direct finite horizontal primitive leaves and wrapped lines, anchoring each shared group at its safe cross end. Explicit self alignment and automatic cross margins opt out; missing providers use content bottom. Outer columns use ordinary logical flex-end without baseline queries. Prepared finite Flex/Flow/Grid roots select the last declared in-flow source for last-baseline, skip absolute decoration and preserve actual receiver/allocation and pre-relative origins. Wrapped Flex uses current native final-line membership; Grid uses declared order regardless of visual row. Empty containers contribute content bottom. Inherited alignSelf: auto joins the baseline group. Explicit per-item alignment skips baseline queries and uses ordinary per-line placement; measured automatic stretch fills its allocated line with existing padding/bounds rules. Each line shares its own physical first baseline; cross reversal repositions line groups and preserves that alignment. Direct nonempty Text with settled dimensions and positive pixel fonts supplies real host metrics for existing Canvas baselines, fitting and overflow policies through the optional measurement service. Empty fitted first/last lines fail explicitly. Applications own custom-font readiness and schedule its next render; non-generic baseline results bypass the retained cache. Wrapped Text measures its actual first and last visible lines at final allocation. Last-baseline alignment remains subsequent work.

FlowProps accepts recursive PibblNode children for sequential flow layout.

FlowStyle configures the direction, wrapping, and declared box for Flow.

GridItemStyle is the direct-child placement style consumed by an explicit Grid parent.

An immutable named minimum/maximum breadth pair created by minmax.

GridProps accepts recursive PibblNode children for explicit-track grid layout.

An immutable track list with a fixed positive repeat count or an automatic fill/fit policy, created by the track constructors.

GridStyle configures declared tracks, implicit tracks, and sparse or dense auto-placement. The native engine supports intrinsic and bounded tracks, fixed repetition, and automatic fill/fit repetition. See Grid track definitions.

GridTrack describes a numeric, percentage, fractional, intrinsic, bounded, or repeated track. Automatic repetitions use the finite owning axis.

A fixed logical length, percentage, fraction, intrinsic keyword, automatic breadth, or branded FitContent bound accepted by a Grid track.

One available axis is { kind: "bounded", min, max } or { kind: "unbounded", min }, in logical units.

Explicit width and height availability for an intrinsic query.

measureIntrinsic receives resolved props, normalized style, tagged constraints and the pure Canvas measurement service. The first experimental consumer is a direct custom primitive in a finite nowrap Flex row.

Returns { status: "measured", minContent, maxContent } with content-box sizes, or { status: "unsupported", reason }. Dimensions are finite and nonnegative; minimum width cannot exceed preferred width. Heights describe the content at the corresponding intrinsic width and need not be ordered. Existing measure is unchanged. A definite basis and explicit minWidth: 0 avoid intrinsic queries.

Direct custom primitives with both pure measureIntrinsic and measure providers may also use measured automatic height in a finite experimental nowrap row at declared numeric width, without aspect sizing or prepared queries. Resolve participation styles with resolveStyle and return allocated drawing dimensions. The Studio custom cross-auto section lays out eight jobs: width80→40 changes height20→40 and top80→60. Wrapping rows, automatic widths, columns and pure intrinsic owners remain outside this bounded contract.

A direct built-in Flex owner also supports measured automatic height with cross-auto margins in a finite experimental nowrap row. Its inner layout must be a finite numeric-width LTR wrapped row of direct numeric Rectangles with zero grow/shrink, without query/aspect sizing. Unsupported intrinsic content remains an error even under stretch. The Studio owner cross-auto section shows three jobs changing height60→90 and top60→30 as width160→90. Other layout-owner and pure intrinsic auto-margin shapes remain deferred.

The direct generic wrapped Text cross-auto subset also accepts omitted or 'auto' width with automatic basis, zero grow, positive/default shrink and no main min/max. Visible/default fit/overflow and no query/aspect sizing remain required. Natural Canvas width supplies its basis; final allocated width controls line count before auto-margin placement. In the Text comparison, a140→100px row with a40px sibling changes one10px line at y90 to two at y80/90. This is host Text sizing, without a native font-parity claim.

Direct generic wrapped Text with finite numeric declared width also supports measured automatic height/cross-auto margins in an experimental LTR row/wrap container, with automatic basis and zero grow/shrink. Keep visible/default fit/overflow and omit query/aspect sizing. Its auto margin absorbs space in its actual line after final-width measurement. Automatic-width wrapped Text, reverse/ RTL/wrap-reverse, provider/layout-owner and column variants remain deferred.

Use insetStart?: number | Percentage and insetEnd?: number | Percentage with a supported direct absolute Flex child. Start maps to left in LTR and right in RTL; end maps to the opposite edge. Logical values override the mapped physical edge, including zero. Percentages use the selected containing padding box width. The receiving Flex direction performs the mapping even when a static owner inherits geometry from an outer box. Existing paired-auto, aspect and pure-provider sizing retain their contracts. Raw fields and signals forward once. Other position modes/layout families, automatic insets and invalid values reject.

import { Flex, Rectangle } from "@pibbl/core";
export function LogicalBadgeExample() {
return (
<Flex style={{ width: 240, height: 120, layoutDirection: "rtl" }}>
<Rectangle
style={{
position: "absolute",
width: 50,
height: 20,
insetStart: "10%",
top: 8,
fill: "#a63758",
}}
/>
</Flex>
);
}

Within an admitted direct declarative finite Flex chain, explicit position: "static" passes absolute insets to the nearest containing Flex. position: "relative" establishes a local box. An omitted position retains Pibbl’s existing local boundary. For an inner box at20,10 and an absolute child with left12/top8, static yields world12,8; relative yields32,18. The inner flow slot is unchanged. This does not infer containing boxes through opaque components, Group, Clip, Layer, transforms, Flow or Grid, and adds no public override. See the layout contract for the bounded admission.

Relative translation remains physical under main reversal. Yoga’s four reversed relative cases are recorded as deliberate differences with separate Pibbl boxes. Non-row containing chains require fixed numeric direct Flex owners with zero grow/shrink and omitted or automatic basis. The nested owner remains nowrap; its parent may wrap under the same fixed-owner restriction.

Physical absolute insets accept numbers or signed decimal percentages: left/right use the selected padding-box width, top/bottom its height. Negative values and values above100% may overflow. Resolution follows containing-box inheritance and precedes paired sizing, bounds and physical precedence. Relative percentages use the parent content box instead. Automatic, malformed and nonfinite insets reject.

A finite Flex in any wrapping mode accepts fixed numeric and opposing-inset automatic absolute boxes in row, row-reverse, column and column-reverse, including RTL. Physical insets keep the same padding-box reference. Without an inset, justifyContent controls the main axis and alignItems the cross axis, using the whole content box rather than an individual flow line. Wrap-reverse reverses omitted cross alignment, combined with column RTL exactly once. A fixed box keeps its size under stretch. Authored paint, click and focus order remain unchanged. Numeric bounds apply to fixed and derived axes before inset anchoring in every direction. Exactly-one-auto aspect derivation also applies in every direction, with paired insets taking precedence and numeric bounds applied afterward. Natural measured dimensions require paired pure providers and preserve their existing exact/unbounded query in every admitted finite main direction and wrapping mode. Other automatic axes need their opposing physical inset pair or the admitted aspect path.

In any admitted finite main direction and wrapping mode, a direct custom primitive with paired pure measureIntrinsic and measure providers can use position: "absolute", width: "auto", height: 20 with, for example, right: 18, top: 8. Without an opposing horizontal inset pair or aspect ratio, measure receives [0, Infinity] width availability and exact20px height. A natural60px width is clamped by numeric bounds and positioned from the owning padding box. Resizing the owner moves a right-anchored child while preserving the measurement envelope; conservative invalidation can requery it. Measurement signals update width and targets through the existing scheduler.

Yoga caps natural-width callbacks to padding-box width in columns. Pibbl preserves its unbounded-width contract there; the comparison labels this query difference separately from matching deterministic geometry. This is not callback parity.

The symmetric width: 80, height: "auto" path queries exact80px width and [0, Infinity] height. A wrapping provider can return20px at80px width and40px at40px width; bottom: 10 anchors the resulting height to the owning padding box. Both paths query the declared fixed dimension before its own bounds, then clamp used dimensions. They require exactly one automatic dimension. This does not add general image/custom-font intrinsic sizing, both-auto custom-provider sizing, opaque component measurement, margins, decoration or responsive-query support. Direct generic visible Text additionally supports automatic height at declared width, unwrapped natural width at declared height, or unwrapped both-auto ink dimensions without opposing pairs or aspect. Canvas ink metrics supply dimensions; final content alignment or physical insets place them after independent bounds.

LayoutBox is the stable readonly child-local allocation available during render through useLayoutBox.

LayoutDiagnosticContext carries component and algorithm context for a public layout/style validation failure.

LayoutDiagnosticInput is the structured public input accepted by layoutDiagnostic to identify property, supplied value, and optional constraints.

LayoutItemStyle is the shared direct-child participation vocabulary for Absolute, Overlay, Flex, and Grid parents.

Length is Pibbl’s public numeric/percentage/"auto" length vocabulary. Resolution requires a definite percentage basis when a percentage is used.

MeasureInput describes an opt-in primitive’s pure measurement request.

MeasureResult is the result of measureElement and distinguishes supported measurement from an unsupported primitive capability.

OverlayStyle is the declared shared-allocation style for Overlay children.

Percentage is the public percentage-length form. It resolves only against a definite nonnegative reference dimension.

ResolvedBoxStyle is the finite box result with its resolved border/content geometry after box-style validation.

Size is the finite width/height record used by layout and measurement.

style.borderWidth reserves finite nonnegative layout insets, using a number or physical { top, right, bottom, left } edges. It defaults to zero and does not paint. Padding and borders combine once: content-box40×30 with padding10 and borderWidth2 occupies64×54; border-box64×54 preserves40×30 content. strokeWidth remains independent paint. Percentage/logical border aliases are not supported. Layer raster sizing retains its separate width/height policy.

Flex alignment values include start and end on FlexStyle.justifyContent, alignItems, alignContent, and FlexItemStyle.alignSelf. These keep their physical LTR edges under experimental main/cross reversal; flex-start and flex-end follow the reversed Flex axes. Experimental FlexStyle.layoutDirection?: "ltr" | "rtl" inherits through layout contexts and Layers, defaults to LTR at a root, and permits explicit LTR override. RTL mirrors row main and column cross placement; logical margin and padding edges are specified below; logical borders remain unsupported.

LayoutItemStyle.marginStart and .marginEnd, also included in FlexItemStyle, are number | Percentage in experimental Flex. They map through inherited direction, or a child Flex’s explicit direction. Logical edges override physical edges and the uniform margin shorthand; zero is explicit and property order does not matter. Signed percentages use the containing Flex content width. Other unsupported layout-family profiles reject these margins.

BoxStyle.paddingStart and .paddingEnd are nonnegative number | Percentage values in experimental box layout. They override the mapped physical padding edge, including zero, independently of property order. Direction is inherited or comes from a child Flex’s explicit layoutDirection. Percentage reference is the containing Flex content width; raw/intrinsic percentages remain unsupported. Layer raster sizing keeps its separate padding-independent policy. Explore logical padding.

Experimental BoxStyle.borderStartWidth?: number and borderEndWidth?: number map through the receiving box’s direction and override the corresponding physical borderWidth edge, including zero, independently of declaration order. Values must be finite nonnegative numbers; percentages are unsupported. A child Flex’s explicit direction overrides inheritance. Allocation canonicalizes logical widths before content-box/border-box conversion and inset floors. These widths reserve layout space; painted strokes remain independent. Layer’s own raster dimensions and child origin retain their existing physical-border behavior. Raw logical border inputs remain ineligible for frozen allocation caching.

Sizing-only min-content and max-content vocabulary. The first experimental owner supports horizontal min/max-content contributions.

Length, SizingKeyword, or FitContent, or stretch. Used for width, height, their bounds, and flex basis; it does not widen padding, positions, gaps or radii. See fitContent for the current native owner boundary.

Supported geometry and presentation properties for Absolute.

type AbsoluteStyle = BoxStyle & LayoutItemStyle

Related API: AbsoluteStyle, BoxStyle, LayoutItemStyle.

BoxStyle

LayoutItemStyle

Absolute

View source — packages/core/src/lib/layout/absolute.ts:69

aspectRatio (optional)
aspectRatio?: number | undefined

Positive finite width/height ratio. A declared definite axis derives the automatic axis before its bounds; boxSizing selects content or border geometry. See resolveBox. Positive finite outer width/height ratio consumed by finite Flex, including wrapped lines. Final per-line main size derives cross size before cross bounds; intrinsic main sizing is unsupported. A documented direct absolute Flex child may derive exactly one automatic outer axis from its declared numeric opposite axis when no opposing inset pair supplies that axis. See FlexItemStyle.

View source — packages/core/src/lib/style/types.ts:84

boxSizing (optional)
boxSizing?: "border-box" | "content-box" | undefined

Selects whether dimensions, bounds and Flex basis include padding and layout borders. Defaults to content-box. Border-box content floors at zero and the outer box floors at total axis padding plus layout borders. Painted stroke widths remain independent. See ResolvedBoxStyle.

View source — packages/core/src/lib/style/types.ts:89

width (optional)
width?: SizingLength | undefined

Related API: SizingLength.

Horizontal extent in the units of the containing geometry or surface. See SizingLength.

View source — packages/core/src/lib/style/types.ts:91

height (optional)
height?: SizingLength | undefined

Related API: SizingLength.

Vertical extent in the units of the containing geometry or surface. See SizingLength.

View source — packages/core/src/lib/style/types.ts:93

minWidth (optional)
minWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Minimum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.

View source — packages/core/src/lib/style/types.ts:95

maxWidth (optional)
maxWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Maximum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.

View source — packages/core/src/lib/style/types.ts:97

minHeight (optional)
minHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Minimum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:99

maxHeight (optional)
maxHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Maximum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:101

padding (optional)
padding?: EdgeValues<number | `${number}%`> | undefined

Related API: EdgeValues.

Padding inside layout borders. Experimental allocated Flex percentages use owner content width for every edge. See EdgeValues, Percentage.

View source — packages/core/src/lib/style/types.ts:103

paddingStart (optional)
paddingStart?: number | `${number}%` | undefined

Nonnegative inline-start padding overriding its physical padding edge. Experimental percentages require an allocated Flex owner and use its content width. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:105

paddingEnd (optional)
paddingEnd?: number | `${number}%` | undefined

Nonnegative inline-end padding overriding its physical padding edge. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:107

borderWidth (optional)
borderWidth?: EdgeValues<number> | undefined

Related API: EdgeValues.

Layout-only physical border insets, in logical pixels. Defaults to zero; does not paint a stroke. See EdgeValues.

View source — packages/core/src/lib/style/types.ts:109

borderStartWidth (optional)
borderStartWidth?: number | undefined

Experimental nonnegative numeric inline-start layout border overriding its physical borderWidth edge. Does not paint a stroke. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:111

borderEndWidth (optional)
borderEndWidth?: number | undefined

Experimental nonnegative numeric inline-end layout border overriding its physical borderWidth edge. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:113

overflow (optional)
overflow?: "clip" | "visible" | undefined

Selects "visible", "clip" for overflow. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:115

layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefined

Numeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.

View source — packages/core/src/lib/types.ts:69

transition (optional)
transition?: PibblTransitionBinding | undefined

Related API: PibblTransitionBinding.

Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.

View source — packages/core/src/lib/types.ts:71

custom (optional)
custom?: unknown

Application-defined style payload passed through the runtime. See SystemStyle.

View source — packages/core/src/lib/types.ts:73

filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefined

Related API: PibblFilter.

Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.

View source — packages/core/src/lib/types.ts:78

margin (optional)
margin?: FlexMargin | undefined

Related API: FlexMargin.

Uniform physical margin in logical Canvas units, a percentage of allocated Flex content width, or auto on supported finite Flex axes. Finite negatives are allowed; specific edges override this value. Consumed by experimental Flex only. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:146

marginTop (optional)
marginTop?: FlexMargin | undefined

Related API: FlexMargin.

Physical top margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:148

marginRight (optional)
marginRight?: FlexMargin | undefined

Related API: FlexMargin.

Physical right margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:150

marginBottom (optional)
marginBottom?: FlexMargin | undefined

Related API: FlexMargin.

Physical bottom margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:152

marginLeft (optional)
marginLeft?: FlexMargin | undefined

Related API: FlexMargin.

Physical left margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:154

marginStart (optional)
marginStart?: FlexMargin | undefined

Related API: FlexMargin.

Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:156

marginEnd (optional)
marginEnd?: FlexMargin | undefined

Related API: FlexMargin.

Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:158

alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefined

This child’s cross-axis or block-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:160

justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefined

This child’s inline-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:162

flexBasis (optional)
flexBasis?: SizingLength | undefined

Related API: SizingLength.

Initial main-axis size before flex growth or shrinkage. See SizingLength.

View source — packages/core/src/lib/style/types.ts:164

flexGrow (optional)
flexGrow?: number | undefined

Relative share of positive free space assigned to this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:166

flexShrink (optional)
flexShrink?: number | undefined

Relative factor used when reducing main-axis size. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:168

gridColumnStart (optional)
gridColumnStart?: number | undefined

Explicit starting grid column. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:170

gridColumnSpan (optional)
gridColumnSpan?: number | undefined

Number of columns occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:172

gridRowStart (optional)
gridRowStart?: number | undefined

Explicit starting grid row. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:174

gridRowSpan (optional)
gridRowSpan?: number | undefined

Number of rows occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:176

position (optional)
position?: "absolute" | "relative" | "static" | undefined

Experimental direct-Flex placement mode. In a finite Flex, static keeps the allocated slot and ignores insets; relative offsets final geometry once without moving siblings. Primitive static/relative leaves support every main/writing direction and wrapping mode. Wrapped parents admit fixed numeric direct Flex owners that remain internally nowrap; non-row chains use the same fixed owner restriction, with zero grow/shrink and omitted or automatic basis; physical offsets retain their sign through main reversal. Absolute stays out of sibling allocation, using the padding box for explicit insets and content alignment for omitted axes. Fixed numeric, percentage and admitted automatic absolute profiles support all main directions and RTL, with numeric or percentage bounds applied before placement. In every wrapping mode, omitted axes use whole-content main/cross alignment; wrap-reverse reverses omitted cross alignment and combines with column RTL exactly once. Paired natural providers keep their exact/unbounded query in every admitted direction. Direct wrapped Text with a generic pixel font and visible fit/overflow may measure automatic height at a resolved numeric or percentage width through the same owned query. Unwrapped Text may measure automatic width at a resolved numeric or percentage height, using its existing Canvas ink-bounds width before bounds and physical anchoring. Generic unwrapped Text also supports natural ink height and both automatic dimensions through one unbounded query before independent numeric clamps; mixed opposing-pair/natural feedback and both-auto aspect remain excluded. On the documented finite direct-child path, automatic absolute axes resolve from opposing numeric or percentage physical insets. With a positive finite aspectRatio, exactly one automatic axis can instead derive from its resolved declared finite numeric or percentage opposite axis. Opposing insets win. Finite numeric or percentage min/max bounds clamp used axes independently after derivation; a clamp does not recouple aspectRatio, and a numeric minimum above its maximum rejects. A direct custom primitive with paired pure measurement providers may instead measure natural automatic width at a declared numeric or percentage height, or natural height at a declared numeric or percentage width. The automatic axis is unbounded; the exact axis uses its declared resolved padding-box value before bounds clamp the used dimensions. In direct declarative Flex chains, static Flex passes the containing box outward while relative Flex owns a local box. Omission retains the legacy local Flex boundary and left/top behavior.

View source — packages/core/src/lib/style/positioning.ts:194

left (optional)
left?: number | `${number}%` | undefined

Left edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:196

right (optional)
right?: number | `${number}%` | undefined

Right edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box width; relative percentages use the parent content-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:198

top (optional)
top?: number | `${number}%` | undefined

Top edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:200

bottom (optional)
bottom?: number | `${number}%` | undefined

Bottom edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box height; relative percentages use the parent content-box height. See Length.

View source — packages/core/src/lib/style/positioning.ts:202

insetStart (optional)
insetStart?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-start inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge, including zero. Percentages use the selected containing padding-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:204

insetEnd (optional)
insetEnd?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-end inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge. See Length.

View source — packages/core/src/lib/style/positioning.ts:206

Supported geometry and presentation properties for Overlay.

interface OverlayStyle extends BoxStyle, LayoutItemStyle

Related API: OverlayStyle, BoxStyle, LayoutItemStyle.

BoxStyle

LayoutItemStyle

Overlay

View source — packages/core/src/lib/layout/overlay.ts:44

alignItems (optional)
alignItems?: OverlayAlignment | undefined

Default alignment of children on the cross or block axis. See OverlayAlignment.

View source — packages/core/src/lib/layout/overlay.ts:46

justifyItems (optional)
justifyItems?: OverlayAlignment | undefined

Default inline-axis alignment of grid or overlay children. See OverlayAlignment.

View source — packages/core/src/lib/layout/overlay.ts:48

position (optional)
position?: "absolute" | "relative" | "static" | undefined

Experimental direct-Flex placement mode. In a finite Flex, static keeps the allocated slot and ignores insets; relative offsets final geometry once without moving siblings. Primitive static/relative leaves support every main/writing direction and wrapping mode. Wrapped parents admit fixed numeric direct Flex owners that remain internally nowrap; non-row chains use the same fixed owner restriction, with zero grow/shrink and omitted or automatic basis; physical offsets retain their sign through main reversal. Absolute stays out of sibling allocation, using the padding box for explicit insets and content alignment for omitted axes. Fixed numeric, percentage and admitted automatic absolute profiles support all main directions and RTL, with numeric or percentage bounds applied before placement. In every wrapping mode, omitted axes use whole-content main/cross alignment; wrap-reverse reverses omitted cross alignment and combines with column RTL exactly once. Paired natural providers keep their exact/unbounded query in every admitted direction. Direct wrapped Text with a generic pixel font and visible fit/overflow may measure automatic height at a resolved numeric or percentage width through the same owned query. Unwrapped Text may measure automatic width at a resolved numeric or percentage height, using its existing Canvas ink-bounds width before bounds and physical anchoring. Generic unwrapped Text also supports natural ink height and both automatic dimensions through one unbounded query before independent numeric clamps; mixed opposing-pair/natural feedback and both-auto aspect remain excluded. On the documented finite direct-child path, automatic absolute axes resolve from opposing numeric or percentage physical insets. With a positive finite aspectRatio, exactly one automatic axis can instead derive from its resolved declared finite numeric or percentage opposite axis. Opposing insets win. Finite numeric or percentage min/max bounds clamp used axes independently after derivation; a clamp does not recouple aspectRatio, and a numeric minimum above its maximum rejects. A direct custom primitive with paired pure measurement providers may instead measure natural automatic width at a declared numeric or percentage height, or natural height at a declared numeric or percentage width. The automatic axis is unbounded; the exact axis uses its declared resolved padding-box value before bounds clamp the used dimensions. In direct declarative Flex chains, static Flex passes the containing box outward while relative Flex owns a local box. Omission retains the legacy local Flex boundary and left/top behavior.

View source — packages/core/src/lib/style/positioning.ts:194

left (optional)
left?: number | `${number}%` | undefined

Left edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:196

right (optional)
right?: number | `${number}%` | undefined

Right edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box width; relative percentages use the parent content-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:198

top (optional)
top?: number | `${number}%` | undefined

Top edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:200

bottom (optional)
bottom?: number | `${number}%` | undefined

Bottom edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box height; relative percentages use the parent content-box height. See Length.

View source — packages/core/src/lib/style/positioning.ts:202

insetStart (optional)
insetStart?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-start inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge, including zero. Percentages use the selected containing padding-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:204

insetEnd (optional)
insetEnd?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-end inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge. See Length.

View source — packages/core/src/lib/style/positioning.ts:206

aspectRatio (optional)
aspectRatio?: number | undefined

Positive finite width/height ratio. A declared definite axis derives the automatic axis before its bounds; boxSizing selects content or border geometry. See resolveBox.

View source — packages/core/src/lib/style/types.ts:84

boxSizing (optional)
boxSizing?: "border-box" | "content-box" | undefined

Selects whether dimensions, bounds and Flex basis include padding and layout borders. Defaults to content-box. Border-box content floors at zero and the outer box floors at total axis padding plus layout borders. Painted stroke widths remain independent. See ResolvedBoxStyle.

View source — packages/core/src/lib/style/types.ts:89

width (optional)
width?: SizingLength | undefined

Related API: SizingLength.

Horizontal extent in the units of the containing geometry or surface. See SizingLength.

View source — packages/core/src/lib/style/types.ts:91

height (optional)
height?: SizingLength | undefined

Related API: SizingLength.

Vertical extent in the units of the containing geometry or surface. See SizingLength.

View source — packages/core/src/lib/style/types.ts:93

minWidth (optional)
minWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Minimum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.

View source — packages/core/src/lib/style/types.ts:95

maxWidth (optional)
maxWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Maximum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.

View source — packages/core/src/lib/style/types.ts:97

minHeight (optional)
minHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Minimum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:99

maxHeight (optional)
maxHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Maximum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:101

padding (optional)
padding?: EdgeValues<number | `${number}%`> | undefined

Related API: EdgeValues.

Padding inside layout borders. Experimental allocated Flex percentages use owner content width for every edge. See EdgeValues, Percentage.

View source — packages/core/src/lib/style/types.ts:103

paddingStart (optional)
paddingStart?: number | `${number}%` | undefined

Nonnegative inline-start padding overriding its physical padding edge. Experimental percentages require an allocated Flex owner and use its content width. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:105

paddingEnd (optional)
paddingEnd?: number | `${number}%` | undefined

Nonnegative inline-end padding overriding its physical padding edge. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:107

borderWidth (optional)
borderWidth?: EdgeValues<number> | undefined

Related API: EdgeValues.

Layout-only physical border insets, in logical pixels. Defaults to zero; does not paint a stroke. See EdgeValues.

View source — packages/core/src/lib/style/types.ts:109

borderStartWidth (optional)
borderStartWidth?: number | undefined

Experimental nonnegative numeric inline-start layout border overriding its physical borderWidth edge. Does not paint a stroke. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:111

borderEndWidth (optional)
borderEndWidth?: number | undefined

Experimental nonnegative numeric inline-end layout border overriding its physical borderWidth edge. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:113

overflow (optional)
overflow?: "clip" | "visible" | undefined

Selects "visible", "clip" for overflow. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:115

margin (optional)
margin?: FlexMargin | undefined

Related API: FlexMargin.

Uniform physical margin in logical Canvas units, a percentage of allocated Flex content width, or auto on supported finite Flex axes. Finite negatives are allowed; specific edges override this value. Consumed by experimental Flex only. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:146

marginTop (optional)
marginTop?: FlexMargin | undefined

Related API: FlexMargin.

Physical top margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:148

marginRight (optional)
marginRight?: FlexMargin | undefined

Related API: FlexMargin.

Physical right margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:150

marginBottom (optional)
marginBottom?: FlexMargin | undefined

Related API: FlexMargin.

Physical bottom margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:152

marginLeft (optional)
marginLeft?: FlexMargin | undefined

Related API: FlexMargin.

Physical left margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:154

marginStart (optional)
marginStart?: FlexMargin | undefined

Related API: FlexMargin.

Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:156

marginEnd (optional)
marginEnd?: FlexMargin | undefined

Related API: FlexMargin.

Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:158

alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefined

This child’s cross-axis or block-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:160

justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefined

This child’s inline-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:162

flexBasis (optional)
flexBasis?: SizingLength | undefined

Related API: SizingLength.

Initial main-axis size before flex growth or shrinkage. See SizingLength.

View source — packages/core/src/lib/style/types.ts:164

flexGrow (optional)
flexGrow?: number | undefined

Relative share of positive free space assigned to this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:166

flexShrink (optional)
flexShrink?: number | undefined

Relative factor used when reducing main-axis size. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:168

gridColumnStart (optional)
gridColumnStart?: number | undefined

Explicit starting grid column. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:170

gridColumnSpan (optional)
gridColumnSpan?: number | undefined

Number of columns occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:172

gridRowStart (optional)
gridRowStart?: number | undefined

Explicit starting grid row. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:174

gridRowSpan (optional)
gridRowSpan?: number | undefined

Number of rows occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:176

layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefined

Numeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.

View source — packages/core/src/lib/types.ts:69

transition (optional)
transition?: PibblTransitionBinding | undefined

Related API: PibblTransitionBinding.

Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.

View source — packages/core/src/lib/types.ts:71

custom (optional)
custom?: unknown

Application-defined style payload passed through the runtime. See SystemStyle.

View source — packages/core/src/lib/types.ts:73

filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefined

Related API: PibblFilter.

Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.

View source — packages/core/src/lib/types.ts:78

Authored inputs for Flow, including the declared data and presentation options.

interface FlowProps extends PibblStructuralEventProps

Related API: FlowProps.

PibblNodeInput

Flow

View source — packages/core/src/lib/layout/flow.ts:74

children
children: PibblNodeInput

Related API: PibblNodeInput.

Descendant content or the callback that supplies it. See PibblNodeInput.

View source — packages/core/src/lib/layout/flow.ts:76

Supported geometry and presentation properties for Flow.

interface FlowStyle extends BoxStyle, LayoutItemStyle

Related API: FlowStyle, BoxStyle, LayoutItemStyle.

BoxStyle

LayoutItemStyle

Flow

View source — packages/core/src/lib/layout/flow.ts:55

direction (optional)
direction?: FlowDirection | undefined

Direction in which this operation proceeds. See FlowDirection.

View source — packages/core/src/lib/layout/flow.ts:57

wrap (optional)
wrap?: boolean | undefined

Whether content may wrap into additional lines. See FlowStyle.

View source — packages/core/src/lib/layout/flow.ts:59

gap (optional)
gap?: number | undefined

Spacing between adjacent items. See FlowStyle.

View source — packages/core/src/lib/layout/flow.ts:61

lineGap (optional)
lineGap?: number | undefined

Space between wrapped flow lines. See FlowStyle.

View source — packages/core/src/lib/layout/flow.ts:63

alignItems (optional)
alignItems?: FlowAlignment | undefined

Default alignment of children on the cross or block axis. See FlowAlignment.

View source — packages/core/src/lib/layout/flow.ts:65

aspectRatio (optional)
aspectRatio?: number | undefined

Positive finite width/height ratio. A declared definite axis derives the automatic axis before its bounds; boxSizing selects content or border geometry. See resolveBox.

View source — packages/core/src/lib/style/types.ts:84

layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefined

Numeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.

View source — packages/core/src/lib/types.ts:69

position (optional)
position?: "absolute" | "relative" | "static" | undefined

Experimental direct-Flex placement mode. In a finite Flex, static keeps the allocated slot and ignores insets; relative offsets final geometry once without moving siblings. Primitive static/relative leaves support every main/writing direction and wrapping mode. Wrapped parents admit fixed numeric direct Flex owners that remain internally nowrap; non-row chains use the same fixed owner restriction, with zero grow/shrink and omitted or automatic basis; physical offsets retain their sign through main reversal. Absolute stays out of sibling allocation, using the padding box for explicit insets and content alignment for omitted axes. Fixed numeric, percentage and admitted automatic absolute profiles support all main directions and RTL, with numeric or percentage bounds applied before placement. In every wrapping mode, omitted axes use whole-content main/cross alignment; wrap-reverse reverses omitted cross alignment and combines with column RTL exactly once. Paired natural providers keep their exact/unbounded query in every admitted direction. Direct wrapped Text with a generic pixel font and visible fit/overflow may measure automatic height at a resolved numeric or percentage width through the same owned query. Unwrapped Text may measure automatic width at a resolved numeric or percentage height, using its existing Canvas ink-bounds width before bounds and physical anchoring. Generic unwrapped Text also supports natural ink height and both automatic dimensions through one unbounded query before independent numeric clamps; mixed opposing-pair/natural feedback and both-auto aspect remain excluded. On the documented finite direct-child path, automatic absolute axes resolve from opposing numeric or percentage physical insets. With a positive finite aspectRatio, exactly one automatic axis can instead derive from its resolved declared finite numeric or percentage opposite axis. Opposing insets win. Finite numeric or percentage min/max bounds clamp used axes independently after derivation; a clamp does not recouple aspectRatio, and a numeric minimum above its maximum rejects. A direct custom primitive with paired pure measurement providers may instead measure natural automatic width at a declared numeric or percentage height, or natural height at a declared numeric or percentage width. The automatic axis is unbounded; the exact axis uses its declared resolved padding-box value before bounds clamp the used dimensions. In direct declarative Flex chains, static Flex passes the containing box outward while relative Flex owns a local box. Omission retains the legacy local Flex boundary and left/top behavior.

View source — packages/core/src/lib/style/positioning.ts:194

left (optional)
left?: number | `${number}%` | undefined

Left edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:196

right (optional)
right?: number | `${number}%` | undefined

Right edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box width; relative percentages use the parent content-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:198

top (optional)
top?: number | `${number}%` | undefined

Top edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:200

bottom (optional)
bottom?: number | `${number}%` | undefined

Bottom edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box height; relative percentages use the parent content-box height. See Length.

View source — packages/core/src/lib/style/positioning.ts:202

insetStart (optional)
insetStart?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-start inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge, including zero. Percentages use the selected containing padding-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:204

insetEnd (optional)
insetEnd?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-end inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge. See Length.

View source — packages/core/src/lib/style/positioning.ts:206

boxSizing (optional)
boxSizing?: "border-box" | "content-box" | undefined

Selects whether dimensions, bounds and Flex basis include padding and layout borders. Defaults to content-box. Border-box content floors at zero and the outer box floors at total axis padding plus layout borders. Painted stroke widths remain independent. See ResolvedBoxStyle.

View source — packages/core/src/lib/style/types.ts:89

width (optional)
width?: SizingLength | undefined

Related API: SizingLength.

Horizontal extent in the units of the containing geometry or surface. See SizingLength.

View source — packages/core/src/lib/style/types.ts:91

height (optional)
height?: SizingLength | undefined

Related API: SizingLength.

Vertical extent in the units of the containing geometry or surface. See SizingLength.

View source — packages/core/src/lib/style/types.ts:93

minWidth (optional)
minWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Minimum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.

View source — packages/core/src/lib/style/types.ts:95

maxWidth (optional)
maxWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Maximum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.

View source — packages/core/src/lib/style/types.ts:97

minHeight (optional)
minHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Minimum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:99

maxHeight (optional)
maxHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Maximum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:101

padding (optional)
padding?: EdgeValues<number | `${number}%`> | undefined

Related API: EdgeValues.

Padding inside layout borders. Experimental allocated Flex percentages use owner content width for every edge. See EdgeValues, Percentage.

View source — packages/core/src/lib/style/types.ts:103

paddingStart (optional)
paddingStart?: number | `${number}%` | undefined

Nonnegative inline-start padding overriding its physical padding edge. Experimental percentages require an allocated Flex owner and use its content width. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:105

paddingEnd (optional)
paddingEnd?: number | `${number}%` | undefined

Nonnegative inline-end padding overriding its physical padding edge. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:107

borderWidth (optional)
borderWidth?: EdgeValues<number> | undefined

Related API: EdgeValues.

Layout-only physical border insets, in logical pixels. Defaults to zero; does not paint a stroke. See EdgeValues.

View source — packages/core/src/lib/style/types.ts:109

borderStartWidth (optional)
borderStartWidth?: number | undefined

Experimental nonnegative numeric inline-start layout border overriding its physical borderWidth edge. Does not paint a stroke. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:111

borderEndWidth (optional)
borderEndWidth?: number | undefined

Experimental nonnegative numeric inline-end layout border overriding its physical borderWidth edge. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:113

overflow (optional)
overflow?: "clip" | "visible" | undefined

Selects "visible", "clip" for overflow. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:115

margin (optional)
margin?: FlexMargin | undefined

Related API: FlexMargin.

Uniform physical margin in logical Canvas units, a percentage of allocated Flex content width, or auto on supported finite Flex axes. Finite negatives are allowed; specific edges override this value. Consumed by experimental Flex only. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:146

marginTop (optional)
marginTop?: FlexMargin | undefined

Related API: FlexMargin.

Physical top margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:148

marginRight (optional)
marginRight?: FlexMargin | undefined

Related API: FlexMargin.

Physical right margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:150

marginBottom (optional)
marginBottom?: FlexMargin | undefined

Related API: FlexMargin.

Physical bottom margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:152

marginLeft (optional)
marginLeft?: FlexMargin | undefined

Related API: FlexMargin.

Physical left margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:154

marginStart (optional)
marginStart?: FlexMargin | undefined

Related API: FlexMargin.

Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:156

marginEnd (optional)
marginEnd?: FlexMargin | undefined

Related API: FlexMargin.

Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:158

alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefined

This child’s cross-axis or block-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:160

justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefined

This child’s inline-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:162

flexBasis (optional)
flexBasis?: SizingLength | undefined

Related API: SizingLength.

Initial main-axis size before flex growth or shrinkage. See SizingLength.

View source — packages/core/src/lib/style/types.ts:164

flexGrow (optional)
flexGrow?: number | undefined

Relative share of positive free space assigned to this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:166

flexShrink (optional)
flexShrink?: number | undefined

Relative factor used when reducing main-axis size. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:168

gridColumnStart (optional)
gridColumnStart?: number | undefined

Explicit starting grid column. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:170

gridColumnSpan (optional)
gridColumnSpan?: number | undefined

Number of columns occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:172

gridRowStart (optional)
gridRowStart?: number | undefined

Explicit starting grid row. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:174

gridRowSpan (optional)
gridRowSpan?: number | undefined

Number of rows occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:176

transition (optional)
transition?: PibblTransitionBinding | undefined

Related API: PibblTransitionBinding.

Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.

View source — packages/core/src/lib/types.ts:71

custom (optional)
custom?: unknown

Application-defined style payload passed through the runtime. See SystemStyle.

View source — packages/core/src/lib/types.ts:73

filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefined

Related API: PibblFilter.

Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.

View source — packages/core/src/lib/types.ts:78

Authored inputs for Flex, including the declared data and presentation options.

interface FlexProps extends PibblStructuralEventProps

Related API: FlexProps.

PibblNodeInput

Flex

View source — packages/core/src/lib/layout/flex.ts:119

children
children: PibblNodeInput

Related API: PibblNodeInput.

Descendant content or the callback that supplies it. See PibblNodeInput.

View source — packages/core/src/lib/layout/flex.ts:121

Supported geometry and presentation properties for Flex.

interface FlexStyle extends BoxStyle, LayoutItemStyle

Related API: FlexStyle, BoxStyle, LayoutItemStyle.

BoxStyle

LayoutItemStyle

Flex

View source — packages/core/src/lib/layout/flex.ts:89

layoutDirection (optional)
layoutDirection?: "ltr" | "rtl" | undefined

Inherited inline direction. Roots default to LTR. See Flex.

View source — packages/core/src/lib/layout/flex.ts:91

flexDirection (optional)
flexDirection?: FlexDirection | undefined

The main axis along which flex children are placed. See FlexDirection.

View source — packages/core/src/lib/layout/flex.ts:93

flexWrap (optional)
flexWrap?: FlexWrap | undefined

Whether children may wrap onto additional flex lines. See FlexWrap.

View source — packages/core/src/lib/layout/flex.ts:95

justifyContent (optional)
justifyContent?: "end" | "start" | MainAlignment | undefined

Distribution along the main axis. start/end follow layout direction independently of axis reversal. See MainAlignment.

View source — packages/core/src/lib/layout/flex.ts:97

alignItems (optional)
alignItems?: "end" | "start" | ItemCrossAlignment | undefined

Cross alignment. start/end follow layout direction independently of wrap reversal. See CrossAlignment.

View source — packages/core/src/lib/layout/flex.ts:99

alignContent (optional)
alignContent?: "center" | "end" | "flex-end" | "flex-start" | "space-around" | "space-between" | "space-evenly" | "start" | "stretch" | undefined

Distribution of wrapped flex lines within the available cross-axis space. See CrossAlignment, MainAlignment.

View source — packages/core/src/lib/layout/flex.ts:104

gap (optional)
gap?: number | `${number}%` | undefined

Numeric spacing, or experimental allocated-axis percentages. See Percentage, FlexStyle.

View source — packages/core/src/lib/layout/flex.ts:106

rowGap (optional)
rowGap?: number | `${number}%` | undefined

Physical row spacing; experimental percentages use content height. See Percentage, FlexStyle.

View source — packages/core/src/lib/layout/flex.ts:108

columnGap (optional)
columnGap?: number | `${number}%` | undefined

Physical column spacing; experimental percentages use content width. See Percentage, FlexStyle.

View source — packages/core/src/lib/layout/flex.ts:110

borderStartWidth (optional)
borderStartWidth?: number | undefined

Experimental nonnegative numeric inline-start layout border overriding its physical borderWidth edge. Does not paint a stroke. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:111

borderEndWidth (optional)
borderEndWidth?: number | undefined

Experimental nonnegative numeric inline-end layout border overriding its physical borderWidth edge. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:113

overflow (optional)
overflow?: "clip" | "visible" | undefined

Selects "visible", "clip" for overflow. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:115

position (optional)
position?: "absolute" | "relative" | "static" | undefined

Experimental direct-Flex placement mode. In a finite Flex, static keeps the allocated slot and ignores insets; relative offsets final geometry once without moving siblings. Primitive static/relative leaves support every main/writing direction and wrapping mode. Wrapped parents admit fixed numeric direct Flex owners that remain internally nowrap; non-row chains use the same fixed owner restriction, with zero grow/shrink and omitted or automatic basis; physical offsets retain their sign through main reversal. Absolute stays out of sibling allocation, using the padding box for explicit insets and content alignment for omitted axes. Fixed numeric, percentage and admitted automatic absolute profiles support all main directions and RTL, with numeric or percentage bounds applied before placement. In every wrapping mode, omitted axes use whole-content main/cross alignment; wrap-reverse reverses omitted cross alignment and combines with column RTL exactly once. Paired natural providers keep their exact/unbounded query in every admitted direction. Direct wrapped Text with a generic pixel font and visible fit/overflow may measure automatic height at a resolved numeric or percentage width through the same owned query. Unwrapped Text may measure automatic width at a resolved numeric or percentage height, using its existing Canvas ink-bounds width before bounds and physical anchoring. Generic unwrapped Text also supports natural ink height and both automatic dimensions through one unbounded query before independent numeric clamps; mixed opposing-pair/natural feedback and both-auto aspect remain excluded. On the documented finite direct-child path, automatic absolute axes resolve from opposing numeric or percentage physical insets. With a positive finite aspectRatio, exactly one automatic axis can instead derive from its resolved declared finite numeric or percentage opposite axis. Opposing insets win. Finite numeric or percentage min/max bounds clamp used axes independently after derivation; a clamp does not recouple aspectRatio, and a numeric minimum above its maximum rejects. A direct custom primitive with paired pure measurement providers may instead measure natural automatic width at a declared numeric or percentage height, or natural height at a declared numeric or percentage width. The automatic axis is unbounded; the exact axis uses its declared resolved padding-box value before bounds clamp the used dimensions. In direct declarative Flex chains, static Flex passes the containing box outward while relative Flex owns a local box. Omission retains the legacy local Flex boundary and left/top behavior.

View source — packages/core/src/lib/style/positioning.ts:194

left (optional)
left?: number | `${number}%` | undefined

Left edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:196

right (optional)
right?: number | `${number}%` | undefined

Right edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box width; relative percentages use the parent content-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:198

top (optional)
top?: number | `${number}%` | undefined

Top edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:200

bottom (optional)
bottom?: number | `${number}%` | undefined

Bottom edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box height; relative percentages use the parent content-box height. See Length.

View source — packages/core/src/lib/style/positioning.ts:202

insetStart (optional)
insetStart?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-start inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge, including zero. Percentages use the selected containing padding-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:204

insetEnd (optional)
insetEnd?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-end inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge. See Length.

View source — packages/core/src/lib/style/positioning.ts:206

aspectRatio (optional)
aspectRatio?: number | undefined

Positive finite width/height ratio. A declared definite axis derives the automatic axis before its bounds; boxSizing selects content or border geometry. See resolveBox.

View source — packages/core/src/lib/style/types.ts:84

boxSizing (optional)
boxSizing?: "border-box" | "content-box" | undefined

Selects whether dimensions, bounds and Flex basis include padding and layout borders. Defaults to content-box. Border-box content floors at zero and the outer box floors at total axis padding plus layout borders. Painted stroke widths remain independent. See ResolvedBoxStyle.

View source — packages/core/src/lib/style/types.ts:89

width (optional)
width?: SizingLength | undefined

Related API: SizingLength.

Horizontal extent in the units of the containing geometry or surface. See SizingLength.

View source — packages/core/src/lib/style/types.ts:91

height (optional)
height?: SizingLength | undefined

Related API: SizingLength.

Vertical extent in the units of the containing geometry or surface. See SizingLength.

View source — packages/core/src/lib/style/types.ts:93

minWidth (optional)
minWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Minimum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.

View source — packages/core/src/lib/style/types.ts:95

maxWidth (optional)
maxWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Maximum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.

View source — packages/core/src/lib/style/types.ts:97

minHeight (optional)
minHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Minimum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:99

maxHeight (optional)
maxHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Maximum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:101

padding (optional)
padding?: EdgeValues<number | `${number}%`> | undefined

Related API: EdgeValues.

Padding inside layout borders. Experimental allocated Flex percentages use owner content width for every edge. See EdgeValues, Percentage.

View source — packages/core/src/lib/style/types.ts:103

paddingStart (optional)
paddingStart?: number | `${number}%` | undefined

Nonnegative inline-start padding overriding its physical padding edge. Experimental percentages require an allocated Flex owner and use its content width. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:105

paddingEnd (optional)
paddingEnd?: number | `${number}%` | undefined

Nonnegative inline-end padding overriding its physical padding edge. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:107

borderWidth (optional)
borderWidth?: EdgeValues<number> | undefined

Related API: EdgeValues.

Layout-only physical border insets, in logical pixels. Defaults to zero; does not paint a stroke. See EdgeValues.

View source — packages/core/src/lib/style/types.ts:109

margin (optional)
margin?: FlexMargin | undefined

Related API: FlexMargin.

Uniform physical margin in logical Canvas units, a percentage of allocated Flex content width, or auto on supported finite Flex axes. Finite negatives are allowed; specific edges override this value. Consumed by experimental Flex only. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:146

marginTop (optional)
marginTop?: FlexMargin | undefined

Related API: FlexMargin.

Physical top margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:148

marginRight (optional)
marginRight?: FlexMargin | undefined

Related API: FlexMargin.

Physical right margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:150

marginBottom (optional)
marginBottom?: FlexMargin | undefined

Related API: FlexMargin.

Physical bottom margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:152

marginLeft (optional)
marginLeft?: FlexMargin | undefined

Related API: FlexMargin.

Physical left margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:154

marginStart (optional)
marginStart?: FlexMargin | undefined

Related API: FlexMargin.

Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:156

marginEnd (optional)
marginEnd?: FlexMargin | undefined

Related API: FlexMargin.

Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:158

alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefined

This child’s cross-axis or block-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:160

justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefined

This child’s inline-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:162

flexBasis (optional)
flexBasis?: SizingLength | undefined

Related API: SizingLength.

Initial main-axis size before flex growth or shrinkage. See SizingLength.

View source — packages/core/src/lib/style/types.ts:164

flexGrow (optional)
flexGrow?: number | undefined

Relative share of positive free space assigned to this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:166

flexShrink (optional)
flexShrink?: number | undefined

Relative factor used when reducing main-axis size. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:168

gridColumnStart (optional)
gridColumnStart?: number | undefined

Explicit starting grid column. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:170

gridColumnSpan (optional)
gridColumnSpan?: number | undefined

Number of columns occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:172

gridRowStart (optional)
gridRowStart?: number | undefined

Explicit starting grid row. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:174

gridRowSpan (optional)
gridRowSpan?: number | undefined

Number of rows occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:176

layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefined

Numeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.

View source — packages/core/src/lib/types.ts:69

transition (optional)
transition?: PibblTransitionBinding | undefined

Related API: PibblTransitionBinding.

Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.

View source — packages/core/src/lib/types.ts:71

custom (optional)
custom?: unknown

Application-defined style payload passed through the runtime. See SystemStyle.

View source — packages/core/src/lib/types.ts:73

filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefined

Related API: PibblFilter.

Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.

View source — packages/core/src/lib/types.ts:78

A scalar, fractional, or intrinsic breadth accepted by a Grid track.

type GridTrackBreadth = number | `${number}%` | `${number}fr` | SizingKeyword | FitContent | 'auto'

Related API: GridTrackBreadth, SizingKeyword, FitContent.

GridTrack

View source — packages/core/src/lib/layout/grid.ts:58

A bounded Grid track whose minimum and maximum are resolved by the Grid owner.

interface GridMinMaxTrack

Related API: GridMinMaxTrack.

GridTrack

View source — packages/core/src/lib/layout/grid.ts:64

kind
readonly kind: "minmax"

Related API: minmax.

Identifies the bounded track definition. See GridMinMaxTrack.

View source — packages/core/src/lib/layout/grid.ts:66

min
readonly min: GridTrackBreadth

Related API: GridTrackBreadth.

Minimum track breadth. See GridTrackBreadth.

View source — packages/core/src/lib/layout/grid.ts:68

max
readonly max: GridTrackBreadth

Related API: GridTrackBreadth.

Maximum track breadth. See GridTrackBreadth.

View source — packages/core/src/lib/layout/grid.ts:70

A repeated GridTrack list. auto-fill and auto-fit use the available axis size.

interface GridRepeatTrack

Related API: GridRepeatTrack.

View source — packages/core/src/lib/layout/grid.ts:74

kind
readonly kind: "repeat"

Related API: repeat.

Identifies the repetition definition. See GridRepeatTrack.

View source — packages/core/src/lib/layout/grid.ts:76

count
readonly count: number | "auto-fill" | "auto-fit"

Fixed count or automatic fill/fit policy. See GridRepeatTrack.

View source — packages/core/src/lib/layout/grid.ts:78

tracks
readonly tracks: readonly GridTrack[]

Related API: GridTrack.

Ordered pattern to repeat. See GridTrack.

View source — packages/core/src/lib/layout/grid.ts:80

Authored inputs for Grid, including the declared data and presentation options.

interface GridProps extends PibblStructuralEventProps

Related API: GridProps.

PibblNodeInput

Grid

View source — packages/core/src/lib/layout/grid.ts:168

children
children: PibblNodeInput

Related API: PibblNodeInput.

Descendant content or the callback that supplies it. See PibblNodeInput.

View source — packages/core/src/lib/layout/grid.ts:170

Supported geometry and presentation properties for Grid.

interface GridStyle extends BoxStyle, LayoutItemStyle

Related API: GridStyle, BoxStyle, LayoutItemStyle.

BoxStyle

LayoutItemStyle

GridTrack

Grid

View source — packages/core/src/lib/layout/grid.ts:139

gridTemplateColumns
gridTemplateColumns: readonly GridTrack[]

Related API: GridTrack.

Explicit grid column track definitions. See GridTrack.

View source — packages/core/src/lib/layout/grid.ts:141

gridTemplateRows
gridTemplateRows: readonly GridTrack[]

Related API: GridTrack.

Explicit grid row track definitions. See GridTrack.

View source — packages/core/src/lib/layout/grid.ts:143

justifyItems (optional)
justifyItems?: GridAlignment | undefined

Default inline-axis alignment of grid or overlay children. See GridAlignment.

View source — packages/core/src/lib/layout/grid.ts:145

alignItems (optional)
alignItems?: GridAlignment | undefined

Default alignment of children on the cross or block axis. See GridAlignment.

View source — packages/core/src/lib/layout/grid.ts:147

gridAutoFlow (optional)
gridAutoFlow?: "column" | "column dense" | "row" | "row dense" | undefined

Placement direction and dense-packing policy for automatically placed children.

View source — packages/core/src/lib/layout/grid.ts:149

gridAutoColumns (optional)
gridAutoColumns?: GridTrack | undefined

Related API: GridTrack.

Track used when automatic placement creates an implicit column.

View source — packages/core/src/lib/layout/grid.ts:151

gridAutoRows (optional)
gridAutoRows?: GridTrack | undefined

Related API: GridTrack.

Track used when automatic placement creates an implicit row.

View source — packages/core/src/lib/layout/grid.ts:153

gap (optional)
gap?: number | undefined

Spacing between adjacent items. See GridStyle.

View source — packages/core/src/lib/layout/grid.ts:155

rowGap (optional)
rowGap?: number | undefined

Space between adjacent rows or items on the row axis. See GridStyle.

View source — packages/core/src/lib/layout/grid.ts:157

columnGap (optional)
columnGap?: number | undefined

Space between adjacent columns or items on the column axis. See GridStyle.

View source — packages/core/src/lib/layout/grid.ts:159

margin (optional)
margin?: FlexMargin | undefined

Related API: FlexMargin.

Uniform physical margin in logical Canvas units, a percentage of allocated Flex content width, or auto on supported finite Flex axes. Finite negatives are allowed; specific edges override this value. Consumed by experimental Flex only. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:146

marginTop (optional)
marginTop?: FlexMargin | undefined

Related API: FlexMargin.

Physical top margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:148

marginRight (optional)
marginRight?: FlexMargin | undefined

Related API: FlexMargin.

Physical right margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:150

marginBottom (optional)
marginBottom?: FlexMargin | undefined

Related API: FlexMargin.

Physical bottom margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:152

position (optional)
position?: "absolute" | "relative" | "static" | undefined

Experimental direct-Flex placement mode. In a finite Flex, static keeps the allocated slot and ignores insets; relative offsets final geometry once without moving siblings. Primitive static/relative leaves support every main/writing direction and wrapping mode. Wrapped parents admit fixed numeric direct Flex owners that remain internally nowrap; non-row chains use the same fixed owner restriction, with zero grow/shrink and omitted or automatic basis; physical offsets retain their sign through main reversal. Absolute stays out of sibling allocation, using the padding box for explicit insets and content alignment for omitted axes. Fixed numeric, percentage and admitted automatic absolute profiles support all main directions and RTL, with numeric or percentage bounds applied before placement. In every wrapping mode, omitted axes use whole-content main/cross alignment; wrap-reverse reverses omitted cross alignment and combines with column RTL exactly once. Paired natural providers keep their exact/unbounded query in every admitted direction. Direct wrapped Text with a generic pixel font and visible fit/overflow may measure automatic height at a resolved numeric or percentage width through the same owned query. Unwrapped Text may measure automatic width at a resolved numeric or percentage height, using its existing Canvas ink-bounds width before bounds and physical anchoring. Generic unwrapped Text also supports natural ink height and both automatic dimensions through one unbounded query before independent numeric clamps; mixed opposing-pair/natural feedback and both-auto aspect remain excluded. On the documented finite direct-child path, automatic absolute axes resolve from opposing numeric or percentage physical insets. With a positive finite aspectRatio, exactly one automatic axis can instead derive from its resolved declared finite numeric or percentage opposite axis. Opposing insets win. Finite numeric or percentage min/max bounds clamp used axes independently after derivation; a clamp does not recouple aspectRatio, and a numeric minimum above its maximum rejects. A direct custom primitive with paired pure measurement providers may instead measure natural automatic width at a declared numeric or percentage height, or natural height at a declared numeric or percentage width. The automatic axis is unbounded; the exact axis uses its declared resolved padding-box value before bounds clamp the used dimensions. In direct declarative Flex chains, static Flex passes the containing box outward while relative Flex owns a local box. Omission retains the legacy local Flex boundary and left/top behavior.

View source — packages/core/src/lib/style/positioning.ts:194

left (optional)
left?: number | `${number}%` | undefined

Left edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:196

right (optional)
right?: number | `${number}%` | undefined

Right edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box width; relative percentages use the parent content-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:198

top (optional)
top?: number | `${number}%` | undefined

Top edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:200

bottom (optional)
bottom?: number | `${number}%` | undefined

Bottom edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box height; relative percentages use the parent content-box height. See Length.

View source — packages/core/src/lib/style/positioning.ts:202

insetStart (optional)
insetStart?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-start inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge, including zero. Percentages use the selected containing padding-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:204

insetEnd (optional)
insetEnd?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-end inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge. See Length.

View source — packages/core/src/lib/style/positioning.ts:206

aspectRatio (optional)
aspectRatio?: number | undefined

Positive finite width/height ratio. A declared definite axis derives the automatic axis before its bounds; boxSizing selects content or border geometry. See resolveBox.

View source — packages/core/src/lib/style/types.ts:84

boxSizing (optional)
boxSizing?: "border-box" | "content-box" | undefined

Selects whether dimensions, bounds and Flex basis include padding and layout borders. Defaults to content-box. Border-box content floors at zero and the outer box floors at total axis padding plus layout borders. Painted stroke widths remain independent. See ResolvedBoxStyle.

View source — packages/core/src/lib/style/types.ts:89

width (optional)
width?: SizingLength | undefined

Related API: SizingLength.

Horizontal extent in the units of the containing geometry or surface. See SizingLength.

View source — packages/core/src/lib/style/types.ts:91

height (optional)
height?: SizingLength | undefined

Related API: SizingLength.

Vertical extent in the units of the containing geometry or surface. See SizingLength.

View source — packages/core/src/lib/style/types.ts:93

minWidth (optional)
minWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Minimum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.

View source — packages/core/src/lib/style/types.ts:95

maxWidth (optional)
maxWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Maximum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.

View source — packages/core/src/lib/style/types.ts:97

minHeight (optional)
minHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Minimum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:99

maxHeight (optional)
maxHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Maximum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:101

padding (optional)
padding?: EdgeValues<number | `${number}%`> | undefined

Related API: EdgeValues.

Padding inside layout borders. Experimental allocated Flex percentages use owner content width for every edge. See EdgeValues, Percentage.

View source — packages/core/src/lib/style/types.ts:103

paddingStart (optional)
paddingStart?: number | `${number}%` | undefined

Nonnegative inline-start padding overriding its physical padding edge. Experimental percentages require an allocated Flex owner and use its content width. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:105

paddingEnd (optional)
paddingEnd?: number | `${number}%` | undefined

Nonnegative inline-end padding overriding its physical padding edge. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:107

borderWidth (optional)
borderWidth?: EdgeValues<number> | undefined

Related API: EdgeValues.

Layout-only physical border insets, in logical pixels. Defaults to zero; does not paint a stroke. See EdgeValues.

View source — packages/core/src/lib/style/types.ts:109

borderStartWidth (optional)
borderStartWidth?: number | undefined

Experimental nonnegative numeric inline-start layout border overriding its physical borderWidth edge. Does not paint a stroke. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:111

borderEndWidth (optional)
borderEndWidth?: number | undefined

Experimental nonnegative numeric inline-end layout border overriding its physical borderWidth edge. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:113

overflow (optional)
overflow?: "clip" | "visible" | undefined

Selects "visible", "clip" for overflow. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:115

marginLeft (optional)
marginLeft?: FlexMargin | undefined

Related API: FlexMargin.

Physical left margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:154

marginStart (optional)
marginStart?: FlexMargin | undefined

Related API: FlexMargin.

Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:156

marginEnd (optional)
marginEnd?: FlexMargin | undefined

Related API: FlexMargin.

Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:158

alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefined

This child’s cross-axis or block-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:160

justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefined

This child’s inline-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:162

flexBasis (optional)
flexBasis?: SizingLength | undefined

Related API: SizingLength.

Initial main-axis size before flex growth or shrinkage. See SizingLength.

View source — packages/core/src/lib/style/types.ts:164

flexGrow (optional)
flexGrow?: number | undefined

Relative share of positive free space assigned to this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:166

flexShrink (optional)
flexShrink?: number | undefined

Relative factor used when reducing main-axis size. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:168

gridColumnStart (optional)
gridColumnStart?: number | undefined

Explicit starting grid column. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:170

gridColumnSpan (optional)
gridColumnSpan?: number | undefined

Number of columns occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:172

gridRowStart (optional)
gridRowStart?: number | undefined

Explicit starting grid row. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:174

gridRowSpan (optional)
gridRowSpan?: number | undefined

Number of rows occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:176

layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefined

Numeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.

View source — packages/core/src/lib/types.ts:69

transition (optional)
transition?: PibblTransitionBinding | undefined

Related API: PibblTransitionBinding.

Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.

View source — packages/core/src/lib/types.ts:71

custom (optional)
custom?: unknown

Application-defined style payload passed through the runtime. See SystemStyle.

View source — packages/core/src/lib/types.ts:73

filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefined

Related API: PibblFilter.

Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.

View source — packages/core/src/lib/types.ts:78

A fixed logical size, percentage, fraction, intrinsic breadth, minmax, or repeat track. See GridTrackBreadth, GridMinMaxTrack, GridRepeatTrack.

type GridTrack = GridTrackBreadth | GridMinMaxTrack | GridRepeatTrack

Related API: GridTrack, GridTrackBreadth, GridMinMaxTrack, GridRepeatTrack.

View source — packages/core/src/lib/layout/grid.ts:84

Declared box dimensions, size limits, padding, and overflow behavior.

interface BoxStyle extends SystemStyle

Related API: BoxStyle, SystemStyle.

SystemStyle

Length

EdgeValues

ImgStyle

PathStyle

RectStyle

View source — packages/core/src/lib/style/types.ts:82

aspectRatio (optional)
aspectRatio?: number | undefined

Positive finite width/height ratio. A declared definite axis derives the automatic axis before its bounds; boxSizing selects content or border geometry. See resolveBox.

View source — packages/core/src/lib/style/types.ts:84

boxSizing (optional)
boxSizing?: "border-box" | "content-box" | undefined

Selects whether dimensions, bounds and Flex basis include padding and layout borders. Defaults to content-box. Border-box content floors at zero and the outer box floors at total axis padding plus layout borders. Painted stroke widths remain independent. See ResolvedBoxStyle.

View source — packages/core/src/lib/style/types.ts:89

width (optional)
width?: SizingLength | undefined

Related API: SizingLength.

Horizontal extent in the units of the containing geometry or surface. See SizingLength.

View source — packages/core/src/lib/style/types.ts:91

height (optional)
height?: SizingLength | undefined

Related API: SizingLength.

Vertical extent in the units of the containing geometry or surface. See SizingLength.

View source — packages/core/src/lib/style/types.ts:93

minWidth (optional)
minWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Minimum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.

View source — packages/core/src/lib/style/types.ts:95

maxWidth (optional)
maxWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Maximum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.

View source — packages/core/src/lib/style/types.ts:97

minHeight (optional)
minHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Minimum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:99

maxHeight (optional)
maxHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefined

Related API: FitContent, SizingKeyword.

Maximum permitted height. See Length.

View source — packages/core/src/lib/style/types.ts:101

padding (optional)
padding?: EdgeValues<number | `${number}%`> | undefined

Related API: EdgeValues.

Padding inside layout borders. Experimental allocated Flex percentages use owner content width for every edge. See EdgeValues, Percentage.

View source — packages/core/src/lib/style/types.ts:103

paddingStart (optional)
paddingStart?: number | `${number}%` | undefined

Nonnegative inline-start padding overriding its physical padding edge. Experimental percentages require an allocated Flex owner and use its content width. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:105

paddingEnd (optional)
paddingEnd?: number | `${number}%` | undefined

Nonnegative inline-end padding overriding its physical padding edge. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:107

borderWidth (optional)
borderWidth?: EdgeValues<number> | undefined

Related API: EdgeValues.

Layout-only physical border insets, in logical pixels. Defaults to zero; does not paint a stroke. See EdgeValues.

View source — packages/core/src/lib/style/types.ts:109

borderStartWidth (optional)
borderStartWidth?: number | undefined

Experimental nonnegative numeric inline-start layout border overriding its physical borderWidth edge. Does not paint a stroke. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:111

borderEndWidth (optional)
borderEndWidth?: number | undefined

Experimental nonnegative numeric inline-end layout border overriding its physical borderWidth edge. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:113

overflow (optional)
overflow?: "clip" | "visible" | undefined

Selects "visible", "clip" for overflow. See BoxStyle.

View source — packages/core/src/lib/style/types.ts:115

layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefined

Numeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.

View source — packages/core/src/lib/types.ts:69

transition (optional)
transition?: PibblTransitionBinding | undefined

Related API: PibblTransitionBinding.

Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.

View source — packages/core/src/lib/types.ts:71

custom (optional)
custom?: unknown

Application-defined style payload passed through the runtime. See SystemStyle.

View source — packages/core/src/lib/types.ts:73

filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefined

Related API: PibblFilter.

Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.

View source — packages/core/src/lib/types.ts:78

One inset for every edge or independently specified top, right, bottom, and left insets.

type EdgeValues<T extends number | Percentage = number> = | T
| Readonly<{
/** Top edge value or top envelope guide. See {@link EdgeValues}. */
top?: T;
/** Right edge coordinate or inset. See {@link EdgeValues}. */
right?: T;
/** Bottom edge value or bottom envelope guide. See {@link EdgeValues}. */
bottom?: T;
/** Left edge coordinate or inset. See {@link EdgeValues}. */
left?: T;
}>

Related API: EdgeValues, Percentage.

  • T — Permitted edge values; defaults to numeric insets. Padding may opt into Percentage.

BoxStyle

normalizeEdges

View source — packages/core/src/lib/style/types.ts:59

The supported flex sizing and cross-axis alignment properties of a child.

type FlexItemStyle = Pick<
LayoutItemStyle,
'position' | 'left' | 'right' | 'top' | 'bottom' | 'insetStart' | 'insetEnd' | 'aspectRatio' | 'flexBasis' | 'flexGrow' | 'flexShrink' | 'margin' | 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft' | 'marginStart' | 'marginEnd'
> & {
/** This child's cross-axis or block-axis alignment override. See {@link FlexItemStyle}. */
alignSelf?: 'auto' | 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'start' | 'end';
}

Related API: FlexItemStyle, LayoutItemStyle.

LayoutItemStyle

View source — packages/core/src/lib/style/types.ts:184

position (optional)
position?: "absolute" | "relative" | "static" | undefined

Experimental direct-Flex placement mode. In a finite Flex, static keeps the allocated slot and ignores insets; relative offsets final geometry once without moving siblings. Primitive static/relative leaves support every main/writing direction and wrapping mode. Wrapped parents admit fixed numeric direct Flex owners that remain internally nowrap; non-row chains use the same fixed owner restriction, with zero grow/shrink and omitted or automatic basis; physical offsets retain their sign through main reversal. Absolute stays out of sibling allocation, using the padding box for explicit insets and content alignment for omitted axes. Fixed numeric, percentage and admitted automatic absolute profiles support all main directions and RTL, with numeric or percentage bounds applied before placement. In every wrapping mode, omitted axes use whole-content main/cross alignment; wrap-reverse reverses omitted cross alignment and combines with column RTL exactly once. Paired natural providers keep their exact/unbounded query in every admitted direction. Direct wrapped Text with a generic pixel font and visible fit/overflow may measure automatic height at a resolved numeric or percentage width through the same owned query. Unwrapped Text may measure automatic width at a resolved numeric or percentage height, using its existing Canvas ink-bounds width before bounds and physical anchoring. Generic unwrapped Text also supports natural ink height and both automatic dimensions through one unbounded query before independent numeric clamps; mixed opposing-pair/natural feedback and both-auto aspect remain excluded. On the documented finite direct-child path, automatic absolute axes resolve from opposing numeric or percentage physical insets. With a positive finite aspectRatio, exactly one automatic axis can instead derive from its resolved declared finite numeric or percentage opposite axis. Opposing insets win. Finite numeric or percentage min/max bounds clamp used axes independently after derivation; a clamp does not recouple aspectRatio, and a numeric minimum above its maximum rejects. A direct custom primitive with paired pure measurement providers may instead measure natural automatic width at a declared numeric or percentage height, or natural height at a declared numeric or percentage width. The automatic axis is unbounded; the exact axis uses its declared resolved padding-box value before bounds clamp the used dimensions. In direct declarative Flex chains, static Flex passes the containing box outward while relative Flex owns a local box. Omission retains the legacy local Flex boundary and left/top behavior.

View source — packages/core/src/lib/style/positioning.ts:194

left (optional)
left?: number | `${number}%` | undefined

Left edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:196

right (optional)
right?: number | `${number}%` | undefined

Right edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box width; relative percentages use the parent content-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:198

top (optional)
top?: number | `${number}%` | undefined

Top edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:200

bottom (optional)
bottom?: number | `${number}%` | undefined

Bottom edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box height; relative percentages use the parent content-box height. See Length.

View source — packages/core/src/lib/style/positioning.ts:202

insetStart (optional)
insetStart?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-start inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge, including zero. Percentages use the selected containing padding-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:204

insetEnd (optional)
insetEnd?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-end inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge. See Length.

View source — packages/core/src/lib/style/positioning.ts:206

aspectRatio (optional)
aspectRatio?: number | undefined

Positive finite outer width/height ratio consumed by finite Flex, including wrapped lines. Final per-line main size derives cross size before cross bounds; intrinsic main sizing is unsupported. A documented direct absolute Flex child may derive exactly one automatic outer axis from its declared numeric opposite axis when no opposing inset pair supplies that axis. See FlexItemStyle.

View source — packages/core/src/lib/style/types.ts:144

margin (optional)
margin?: FlexMargin | undefined

Related API: FlexMargin.

Uniform physical margin in logical Canvas units, a percentage of allocated Flex content width, or auto on supported finite Flex axes. Finite negatives are allowed; specific edges override this value. Consumed by experimental Flex only. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:146

marginTop (optional)
marginTop?: FlexMargin | undefined

Related API: FlexMargin.

Physical top margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:148

marginRight (optional)
marginRight?: FlexMargin | undefined

Related API: FlexMargin.

Physical right margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:150

marginBottom (optional)
marginBottom?: FlexMargin | undefined

Related API: FlexMargin.

Physical bottom margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:152

marginLeft (optional)
marginLeft?: FlexMargin | undefined

Related API: FlexMargin.

Physical left margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:154

marginStart (optional)
marginStart?: FlexMargin | undefined

Related API: FlexMargin.

Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:156

marginEnd (optional)
marginEnd?: FlexMargin | undefined

Related API: FlexMargin.

Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:158

flexBasis (optional)
flexBasis?: SizingLength | undefined

Related API: SizingLength.

Initial main-axis size before flex growth or shrinkage. See SizingLength.

View source — packages/core/src/lib/style/types.ts:164

flexGrow (optional)
flexGrow?: number | undefined

Relative share of positive free space assigned to this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:166

flexShrink (optional)
flexShrink?: number | undefined

Relative factor used when reducing main-axis size. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:168

alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefined

This child’s cross-axis or block-axis alignment override. See FlexItemStyle.

View source — packages/core/src/lib/style/types.ts:189

Flex edge margin value. Auto distributes remaining space on supported finite experimental Flex axes. See FlexItemStyle.

type FlexMargin = number | Percentage | 'auto'

Related API: FlexMargin, Percentage.

View source — packages/core/src/lib/style/types.ts:132

Explicit grid cell placement, spans, and alignment of a child.

interface GridItemStyle extends SystemStyle

Related API: GridItemStyle, SystemStyle.

SystemStyle

GridStyle

View source — packages/core/src/lib/style/types.ts:198

gridColumnStart (optional)
gridColumnStart?: number | undefined

Explicit starting grid column. See GridItemStyle.

View source — packages/core/src/lib/style/types.ts:200

gridColumnSpan (optional)
gridColumnSpan?: number | undefined

Number of columns occupied by this child. See GridItemStyle.

View source — packages/core/src/lib/style/types.ts:202

gridRowStart (optional)
gridRowStart?: number | undefined

Explicit starting grid row. See GridItemStyle.

View source — packages/core/src/lib/style/types.ts:204

gridRowSpan (optional)
gridRowSpan?: number | undefined

Number of rows occupied by this child. See GridItemStyle.

View source — packages/core/src/lib/style/types.ts:206

alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "start" | "stretch" | undefined

This child’s cross-axis or block-axis alignment override. See GridItemStyle.

View source — packages/core/src/lib/style/types.ts:208

justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefined

This child’s inline-axis alignment override. See GridItemStyle.

View source — packages/core/src/lib/style/types.ts:210

layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefined

Numeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.

View source — packages/core/src/lib/types.ts:69

transition (optional)
transition?: PibblTransitionBinding | undefined

Related API: PibblTransitionBinding.

Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.

View source — packages/core/src/lib/types.ts:71

custom (optional)
custom?: unknown

Application-defined style payload passed through the runtime. See SystemStyle.

View source — packages/core/src/lib/types.ts:73

filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefined

Related API: PibblFilter.

Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.

View source — packages/core/src/lib/types.ts:78

Parent-layout participation: positioning, self-alignment, flex sizing, and explicit grid placement.

interface LayoutItemStyle extends PositioningStyle

Related API: LayoutItemStyle.

Length

FlexItemStyle

ImgStyle

PathStyle

View source — packages/core/src/lib/style/types.ts:142

aspectRatio (optional)
aspectRatio?: number | undefined

Positive finite outer width/height ratio consumed by finite Flex, including wrapped lines. Final per-line main size derives cross size before cross bounds; intrinsic main sizing is unsupported. A documented direct absolute Flex child may derive exactly one automatic outer axis from its declared numeric opposite axis when no opposing inset pair supplies that axis. See FlexItemStyle.

View source — packages/core/src/lib/style/types.ts:144

margin (optional)
margin?: FlexMargin | undefined

Related API: FlexMargin.

Uniform physical margin in logical Canvas units, a percentage of allocated Flex content width, or auto on supported finite Flex axes. Finite negatives are allowed; specific edges override this value. Consumed by experimental Flex only. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:146

marginTop (optional)
marginTop?: FlexMargin | undefined

Related API: FlexMargin.

Physical top margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:148

marginRight (optional)
marginRight?: FlexMargin | undefined

Related API: FlexMargin.

Physical right margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:150

marginBottom (optional)
marginBottom?: FlexMargin | undefined

Related API: FlexMargin.

Physical bottom margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:152

marginLeft (optional)
marginLeft?: FlexMargin | undefined

Related API: FlexMargin.

Physical left margin overriding margin. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:154

marginStart (optional)
marginStart?: FlexMargin | undefined

Related API: FlexMargin.

Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:156

marginEnd (optional)
marginEnd?: FlexMargin | undefined

Related API: FlexMargin.

Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:158

alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefined

This child’s cross-axis or block-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:160

justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefined

This child’s inline-axis alignment override. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:162

flexBasis (optional)
flexBasis?: SizingLength | undefined

Related API: SizingLength.

Initial main-axis size before flex growth or shrinkage. See SizingLength.

View source — packages/core/src/lib/style/types.ts:164

flexGrow (optional)
flexGrow?: number | undefined

Relative share of positive free space assigned to this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:166

flexShrink (optional)
flexShrink?: number | undefined

Relative factor used when reducing main-axis size. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:168

gridColumnStart (optional)
gridColumnStart?: number | undefined

Explicit starting grid column. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:170

gridColumnSpan (optional)
gridColumnSpan?: number | undefined

Number of columns occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:172

gridRowStart (optional)
gridRowStart?: number | undefined

Explicit starting grid row. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:174

gridRowSpan (optional)
gridRowSpan?: number | undefined

Number of rows occupied by this child. See LayoutItemStyle.

View source — packages/core/src/lib/style/types.ts:176

position (optional)
position?: "absolute" | "relative" | "static" | undefined

Experimental direct-Flex placement mode. In a finite Flex, static keeps the allocated slot and ignores insets; relative offsets final geometry once without moving siblings. Primitive static/relative leaves support every main/writing direction and wrapping mode. Wrapped parents admit fixed numeric direct Flex owners that remain internally nowrap; non-row chains use the same fixed owner restriction, with zero grow/shrink and omitted or automatic basis; physical offsets retain their sign through main reversal. Absolute stays out of sibling allocation, using the padding box for explicit insets and content alignment for omitted axes. Fixed numeric, percentage and admitted automatic absolute profiles support all main directions and RTL, with numeric or percentage bounds applied before placement. In every wrapping mode, omitted axes use whole-content main/cross alignment; wrap-reverse reverses omitted cross alignment and combines with column RTL exactly once. Paired natural providers keep their exact/unbounded query in every admitted direction. Direct wrapped Text with a generic pixel font and visible fit/overflow may measure automatic height at a resolved numeric or percentage width through the same owned query. Unwrapped Text may measure automatic width at a resolved numeric or percentage height, using its existing Canvas ink-bounds width before bounds and physical anchoring. Generic unwrapped Text also supports natural ink height and both automatic dimensions through one unbounded query before independent numeric clamps; mixed opposing-pair/natural feedback and both-auto aspect remain excluded. On the documented finite direct-child path, automatic absolute axes resolve from opposing numeric or percentage physical insets. With a positive finite aspectRatio, exactly one automatic axis can instead derive from its resolved declared finite numeric or percentage opposite axis. Opposing insets win. Finite numeric or percentage min/max bounds clamp used axes independently after derivation; a clamp does not recouple aspectRatio, and a numeric minimum above its maximum rejects. A direct custom primitive with paired pure measurement providers may instead measure natural automatic width at a declared numeric or percentage height, or natural height at a declared numeric or percentage width. The automatic axis is unbounded; the exact axis uses its declared resolved padding-box value before bounds clamp the used dimensions. In direct declarative Flex chains, static Flex passes the containing box outward while relative Flex owns a local box. Omission retains the legacy local Flex boundary and left/top behavior.

View source — packages/core/src/lib/style/positioning.ts:194

left (optional)
left?: number | `${number}%` | undefined

Left edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:196

right (optional)
right?: number | `${number}%` | undefined

Right edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box width; relative percentages use the parent content-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:198

top (optional)
top?: number | `${number}%` | undefined

Top edge coordinate or inset. Explicit absolute Flex insets accept finite numbers or percentages of the containing padding-box axis; relative percentages use the parent content-box axis. See Length.

View source — packages/core/src/lib/style/positioning.ts:200

bottom (optional)
bottom?: number | `${number}%` | undefined

Bottom edge inset. Absolute Flex accepts finite numbers or percentages of the containing padding-box height; relative percentages use the parent content-box height. See Length.

View source — packages/core/src/lib/style/positioning.ts:202

insetStart (optional)
insetStart?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-start inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge, including zero. Percentages use the selected containing padding-box width. See Length.

View source — packages/core/src/lib/style/positioning.ts:204

insetEnd (optional)
insetEnd?: number | `${number}%` | undefined

Experimental direct absolute Flex inline-end inset, mapped through the receiving Flex direction. Overrides the corresponding physical edge. See Length.

View source — packages/core/src/lib/style/positioning.ts:206

layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefined

Numeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.

View source — packages/core/src/lib/types.ts:69

transition (optional)
transition?: PibblTransitionBinding | undefined

Related API: PibblTransitionBinding.

Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.

View source — packages/core/src/lib/types.ts:71

custom (optional)
custom?: unknown

Application-defined style payload passed through the runtime. See SystemStyle.

View source — packages/core/src/lib/types.ts:73

filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefined

Related API: PibblFilter.

Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.

View source — packages/core/src/lib/types.ts:78

A layout length in logical units, a parent-relative percentage, or automatic sizing.

type Length = number | Percentage | 'auto'

Related API: Length, Percentage.

Percentage

BoxStyle

LayoutItemStyle

RectStyle

View source — packages/core/src/lib/style/types.ts:34

Resolved border and content boxes after sizing and padding are applied.

interface ResolvedBoxStyle

Related API: ResolvedBoxStyle.

LayoutBox

resolveBox

View source — packages/core/src/lib/style/types.ts:124

borderBox
borderBox: LayoutBox

Related API: LayoutBox.

The resolved outer rectangle including padding. See LayoutBox.

View source — packages/core/src/lib/style/types.ts:126

contentBox
contentBox: LayoutBox

Related API: LayoutBox.

The resolved rectangle available to content after padding. See LayoutBox.

View source — packages/core/src/lib/style/types.ts:128

A percentage string resolved against the relevant parent layout dimension.

type Percentage = `${number}%`

Related API: Percentage.

Length

View source — packages/core/src/lib/style/types.ts:25

Immutable fit-content bound created by fitContent. See SizingLength.

interface FitContent

Related API: FitContent.

View source — packages/core/src/lib/style/sizing-length.ts:11

limit
readonly limit: number | `${number}%`

Finite nonnegative logical length or parent-axis percentage. See Percentage.

View source — packages/core/src/lib/style/sizing-length.ts:13

Sizing values requiring an intrinsic layout owner. See SizingLength.

type SizingKeyword = 'min-content' | 'max-content'

Related API: SizingKeyword.

View source — packages/core/src/lib/style/sizing-length.ts:8

Sizing-only value; padding and insets retain Length. See FitContent, SizingKeyword.

type SizingLength = Length | SizingKeyword | FitContent | 'stretch'

Related API: SizingLength, Length, SizingKeyword, FitContent.

View source — packages/core/src/lib/style/sizing-length.ts:18

Component and source context attached to a layout diagnostic.

interface LayoutDiagnosticContext

Related API: LayoutDiagnosticContext.

Constraints

LayoutDiagnosticInput

normalizeEdges

resolveLength

View source — packages/core/src/lib/style/diagnostics.ts:13

component (optional)
component?: string | undefined

Component identity or diagnostic name associated with this value. See LayoutDiagnosticContext.

View source — packages/core/src/lib/style/diagnostics.ts:18

algorithm (optional)
algorithm?: string | undefined

Name of the layout algorithm producing this diagnostic or resolution. See LayoutDiagnosticContext.

View source — packages/core/src/lib/style/diagnostics.ts:23

constraints (optional)
constraints?: Readonly<Constraints> | undefined

Related API: Constraints.

Sizing limits and available dimensions for this operation. See Constraints.

View source — packages/core/src/lib/style/diagnostics.ts:25

Validation-failure details used to construct a layout diagnostic.

interface LayoutDiagnosticInput extends LayoutDiagnosticContext

Related API: LayoutDiagnosticInput, LayoutDiagnosticContext.

LayoutDiagnosticContext

layoutDiagnostic

View source — packages/core/src/lib/style/diagnostics.ts:34

property
property: string

Name of the affected input property. See LayoutDiagnosticInput.

View source — packages/core/src/lib/style/diagnostics.ts:36

value
value: unknown

Value associated with this sample, input, or result. See LayoutDiagnosticInput.

View source — packages/core/src/lib/style/diagnostics.ts:38

reason
reason: string

Reason the operation could not produce its ordinary result. See LayoutDiagnosticInput .

View source — packages/core/src/lib/style/diagnostics.ts:43

component (optional)
component?: string | undefined

Component identity or diagnostic name associated with this value. See LayoutDiagnosticContext.

View source — packages/core/src/lib/style/diagnostics.ts:18

algorithm (optional)
algorithm?: string | undefined

Name of the layout algorithm producing this diagnostic or resolution. See LayoutDiagnosticContext.

View source — packages/core/src/lib/style/diagnostics.ts:23

constraints (optional)
constraints?: Readonly<Constraints> | undefined

Related API: Constraints.

Sizing limits and available dimensions for this operation. See Constraints.

View source — packages/core/src/lib/style/diagnostics.ts:25

Available and limiting dimensions supplied to layout and measurement.

Equal minimum and maximum values require that exact logical content size. A positive-infinite maximum leaves that axis unbounded; all other values are finite logical sizes.

interface Constraints

Related API: Constraints.

measureElement

resolveBox

LayoutDiagnosticContext

View source — packages/core/src/lib/layout/types.ts:33

minWidth
minWidth: number

Minimum permitted width. See Constraints.

View source — packages/core/src/lib/layout/types.ts:35

maxWidth
maxWidth: number

Maximum permitted width. See Constraints.

View source — packages/core/src/lib/layout/types.ts:37

minHeight
minHeight: number

Minimum permitted height. See Constraints.

View source — packages/core/src/lib/layout/types.ts:39

maxHeight
maxHeight: number

Maximum permitted height. See Constraints.

View source — packages/core/src/lib/layout/types.ts:41

Resolved numeric insets for the four sides of a box.

interface Edges

Related API: Edges.

normalizeEdges

BoxStyle

View source — packages/core/src/lib/layout/types.ts:78

top
top: number

Top edge value or top envelope guide. See Edges.

View source — packages/core/src/lib/layout/types.ts:80

right
right: number

Right edge coordinate or inset. See Edges.

View source — packages/core/src/lib/layout/types.ts:82

bottom
bottom: number

Bottom edge value or bottom envelope guide. See Edges.

View source — packages/core/src/lib/layout/types.ts:84

left
left: number

Left edge coordinate or inset. See Edges.

View source — packages/core/src/lib/layout/types.ts:86

An axis-aligned rectangle in the layout coordinate system.

interface LayoutBox extends Size

Related API: LayoutBox, Size.

Size

PibblRenderLayerTarget

ResolvedBoxStyle

useLayoutBox

View source — packages/core/src/lib/layout/types.ts:52

x
x: number

Horizontal coordinate or displacement in the containing coordinate system. See LayoutBox.

View source — packages/core/src/lib/layout/types.ts:57

y
y: number

Vertical coordinate or displacement in the containing coordinate system. See LayoutBox .

View source — packages/core/src/lib/layout/types.ts:62

width
width: number

Horizontal extent in the units of the containing geometry or surface. See Size.

View source — packages/core/src/lib/layout/types.ts:17

height
height: number

Vertical extent in the units of the containing geometry or surface. See Size.

View source — packages/core/src/lib/layout/types.ts:19

Width and height in logical Canvas units.

interface Size

Related API: Size.

LayoutBox

MeasureResult

View source — packages/core/src/lib/layout/types.ts:15

width
width: number

Horizontal extent in the units of the containing geometry or surface. See Size.

View source — packages/core/src/lib/layout/types.ts:17

height
height: number

Vertical extent in the units of the containing geometry or surface. See Size.

View source — packages/core/src/lib/layout/types.ts:19

Canvas text measurement services supplied to pure layout measurement.

interface CanvasMeasurementService

Related API: CanvasMeasurementService.

MeasureInput

measureElement

View source — packages/core/src/lib/types.ts:330

measureText
measureText: (text: string, font: string) => TextMetrics

Measures text using the requested Canvas font configuration. See CanvasMeasurementService.

  • text — Text to measure.

  • font — Canvas font string used for measurement.

Canvas text metrics for the supplied text and font.

View source — packages/core/src/lib/types.ts:338

measureTextAtBaseline (optional)
measureTextAtBaseline?: ((text: string, options: Readonly<{ font: string; textBaseline: CanvasTextBaseline; }>) => TextMetrics) | undefined

Measures text with the requested Canvas baseline state. Providers that do not implement this optional capability cannot supply Text baseline composition.

Canvas metrics in the requested baseline coordinate system.

View source — packages/core/src/lib/types.ts:346

Declared style, props, and constraints passed to a primitive’s measurement callback.

interface MeasureInput<P, S extends SystemStyle = SystemStyle>

Related API: MeasureInput, SystemStyle.

SystemStyle

NormalizedStyle

Constraints

CanvasMeasurementService

PibblElement

MeasureResult

PrimitiveCapabilities

View source — packages/core/src/lib/types.ts:390

props
props: Readonly<P>

Component props supplied to evaluation or measurement. See MeasureInput.

View source — packages/core/src/lib/types.ts:392

style
style: Readonly<S>

Declared presentation and layout properties. See NormalizedStyle.

View source — packages/core/src/lib/types.ts:394

constraints
constraints: Readonly<Constraints>

Related API: Constraints.

Sizing limits and available dimensions for this operation. See Constraints.

View source — packages/core/src/lib/types.ts:396

service
service: CanvasMeasurementService

Related API: CanvasMeasurementService.

Measurement services available while evaluating this input. See CanvasMeasurementService.

View source — packages/core/src/lib/types.ts:401

measureElement
measureElement: (element: PibblElement<any>, constraints: Readonly<Constraints>) => MeasureResult

Related API: measureElement, PibblElement, Constraints, MeasureResult.

Measures a nested element using the current measurement context. See MeasureResult.

  • element — Child element to measure. See PibblElement.

  • constraints — Available dimensions in logical units. See Constraints.

Measured dimensions or an unsupported measurement result. See MeasureResult.

View source — packages/core/src/lib/types.ts:408

Available logical size along one intrinsic query axis. See IntrinsicConstraints.

type IntrinsicAxisConstraints = | Readonly<{ /** Finite availability. */ kind: 'bounded'; /** Minimum logical length. */ min: number; /** Maximum logical length. */ max: number }>
| Readonly<{ /** No finite upper bound. */ kind: 'unbounded'; /** Minimum logical length. */ min: number }>

Related API: IntrinsicAxisConstraints.

View source — packages/core/src/lib/types.ts:415

kind
kind: "bounded" | "unbounded"

View source — packages/core/src/lib/types.ts:416

min
min: number

View source — packages/core/src/lib/types.ts:416

Explicit axis availability for intrinsic measurement. See IntrinsicMeasureInput.

interface IntrinsicConstraints

Related API: IntrinsicConstraints.

View source — packages/core/src/lib/types.ts:420

width
readonly width: IntrinsicAxisConstraints

Related API: IntrinsicAxisConstraints.

Horizontal availability. See IntrinsicAxisConstraints.

View source — packages/core/src/lib/types.ts:422

height
readonly height: IntrinsicAxisConstraints

Related API: IntrinsicAxisConstraints.

Vertical availability. See IntrinsicAxisConstraints.

View source — packages/core/src/lib/types.ts:424

Pure custom-leaf input for both intrinsic contributions. See PrimitiveCapabilities.

interface IntrinsicMeasureInput<P, S extends SystemStyle = SystemStyle>

Related API: IntrinsicMeasureInput, SystemStyle.

View source — packages/core/src/lib/types.ts:428

props
readonly props: Readonly<P>

Resolved receiver inputs. See MeasureInput.

View source — packages/core/src/lib/types.ts:430

style
readonly style: Readonly<S>

Normalized content style. See NormalizedStyle.

View source — packages/core/src/lib/types.ts:432

constraints
readonly constraints: Readonly<IntrinsicConstraints>

Related API: IntrinsicConstraints.

Tagged available dimensions. See IntrinsicConstraints.

View source — packages/core/src/lib/types.ts:434

service
readonly service: CanvasMeasurementService

Related API: CanvasMeasurementService.

Pure Canvas measurements. See CanvasMeasurementService.

View source — packages/core/src/lib/types.ts:436

Both content-box intrinsic contributions or explicit failure. See IntrinsicMeasureInput.

type IntrinsicSizesResult = | Readonly<{ /** Successful intrinsic query. */ status: 'measured'; /** Minimum unbroken content size. See {@link Size}. */ minContent: Readonly<Size>; /** Preferred content size. See {@link Size}. */ maxContent: Readonly<Size> }>
| Readonly<{ /** Unsupported intrinsic query. */ status: 'unsupported'; /** Actionable explanation. */ reason: string }>

Related API: IntrinsicSizesResult, Size.

View source — packages/core/src/lib/types.ts:440

status
status: "measured" | "unsupported"

View source — packages/core/src/lib/types.ts:441

Final-allocation input for a pure custom baseline query. See PrimitiveCapabilities.

interface BaselineMeasureInput<P, S extends SystemStyle = SystemStyle>

Related API: BaselineMeasureInput, SystemStyle.

View source — packages/core/src/lib/types.ts:445

props
readonly props: Readonly<P>

Resolved receiver inputs. See MeasureInput.

View source — packages/core/src/lib/types.ts:447

style
readonly style: Readonly<S>

Normalized content style. See NormalizedStyle.

View source — packages/core/src/lib/types.ts:449

allocation
readonly allocation: Readonly<LayoutBox>

Related API: LayoutBox.

Final local content allocation; origin is always { x: 0, y: 0 }. See LayoutBox.

View source — packages/core/src/lib/types.ts:451

service
readonly service: CanvasMeasurementService

Related API: CanvasMeasurementService.

Pure Canvas measurements. See CanvasMeasurementService.

View source — packages/core/src/lib/types.ts:453

First/last baseline offsets from content top, or explicit inability to provide them. Finite offsets may be negative or outside the content box; first must not exceed last.

Full type declaration
type BaselinesResult = | Readonly<{
/** Successful baseline query. See {@link BaselinesResult}. */
status: 'measured';
/** First logical baseline offset from the content top. See {@link BaselinesResult}. */
first: number;
/** Last logical baseline offset, at or after first. See {@link BaselinesResult}. */
last: number;
}>
| Readonly<{
/** Explicit inability to supply baselines. See {@link BaselinesResult}. */
status: 'unsupported';
/** Actionable explanation; does not select the missing-provider fallback. See {@link BaselinesResult}. */
reason: string;
}>

Related API: BaselinesResult.

BaselineMeasureInput

PrimitiveCapabilities

View source — packages/core/src/lib/types.ts:461

status
status: "measured" | "unsupported"

Successful baseline query. See BaselinesResult. Explicit inability to supply baselines. See BaselinesResult.

View source — packages/core/src/lib/types.ts:464

Measured dimensions, or an explicit unsupported result with a diagnostic reason.

type MeasureResult = | {
/** The literal "measured" identifying this variant. See {@link MeasureResult}. */
status: "measured";
/** Measured logical width and height. See {@link Size}. */
size: Readonly<Size>;
}
| {
/** The literal "unsupported" identifying this variant. See {@link MeasureResult}. */
status: "unsupported";
/** Reason the operation could not produce its ordinary result. See {@link MeasureResult}. */
reason: string;
}

Related API: MeasureResult, Size.

Size

PrimitiveCapabilities

MeasureInput

measureElement

View source — packages/core/src/lib/types.ts:365

status
status: "measured" | "unsupported"

The literal “measured” identifying this variant. See MeasureResult. The literal “unsupported” identifying this variant. See MeasureResult.

View source — packages/core/src/lib/types.ts:368

Read the Drawing, layout, and effects companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.

Documentation built with @pibbl/core 0.0.2, revision a1dcf8e. ALPHA — NOT FOR PRODUCTION USE.