Layout types
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
Section titled “AbsoluteStyle”AbsoluteStyle is the declared container style for Absolute, including its
finite box and the independent left/top placement vocabulary for children.
BaselineMeasureInput
Section titled “BaselineMeasureInput”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.
BaselinesResult
Section titled “BaselinesResult”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
Section titled “BoxStyle”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
Section titled “CanvasMeasurementService”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
Section titled “Constraints”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
Section titled “EdgeValues”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.
FitContent
Section titled “FitContent”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.
FlexItemStyle
Section titled “FlexItemStyle”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
Section titled “FlexMargin”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
Section titled “FlexProps”FlexProps accepts recursive PibblNode children for Pibbl’s supported Flexbox
subset.
FlexStyle
Section titled “FlexStyle”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
Section titled “FlowProps”FlowProps accepts recursive PibblNode children for sequential flow layout.
FlowStyle
Section titled “FlowStyle”FlowStyle configures the direction, wrapping, and declared box for Flow.
GridItemStyle
Section titled “GridItemStyle”GridItemStyle is the direct-child placement style consumed by an explicit
Grid parent.
GridMinMaxTrack
Section titled “GridMinMaxTrack”An immutable named minimum/maximum breadth pair created by
minmax.
GridProps
Section titled “GridProps”GridProps accepts recursive PibblNode children for explicit-track grid layout.
GridRepeatTrack
Section titled “GridRepeatTrack”An immutable track list with a fixed positive repeat count or an automatic fill/fit policy, created by the track constructors.
GridStyle
Section titled “GridStyle”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
Section titled “GridTrack”GridTrack describes a numeric, percentage, fractional, intrinsic, bounded, or
repeated track. Automatic repetitions use the finite owning axis.
GridTrackBreadth
Section titled “GridTrackBreadth”A fixed logical length, percentage, fraction, intrinsic keyword, automatic breadth,
or branded FitContent bound accepted by a Grid track.
IntrinsicAxisConstraints
Section titled “IntrinsicAxisConstraints”One available axis is { kind: "bounded", min, max } or
{ kind: "unbounded", min }, in logical units.
IntrinsicConstraints
Section titled “IntrinsicConstraints”Explicit width and height availability for an intrinsic query.
IntrinsicMeasureInput
Section titled “IntrinsicMeasureInput”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.
IntrinsicSizesResult
Section titled “IntrinsicSizesResult”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.
Experimental logical absolute insets
Section titled “Experimental logical absolute insets”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> );}Experimental nested containing boxes
Section titled “Experimental nested containing boxes”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.
Experimental absolute main directions
Section titled “Experimental absolute main directions”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.
Experimental measured absolute size
Section titled “Experimental measured absolute size”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
Section titled “LayoutBox”LayoutBox is the stable readonly child-local allocation available during
render through useLayoutBox.
LayoutDiagnosticContext
Section titled “LayoutDiagnosticContext”LayoutDiagnosticContext carries component and algorithm context for a public
layout/style validation failure.
LayoutDiagnosticInput
Section titled “LayoutDiagnosticInput”LayoutDiagnosticInput is the structured public input accepted by
layoutDiagnostic to identify property, supplied value, and optional
constraints.
LayoutItemStyle
Section titled “LayoutItemStyle”LayoutItemStyle is the shared direct-child participation vocabulary for
Absolute, Overlay, Flex, and Grid parents.
Length
Section titled “Length”Length is Pibbl’s public numeric/percentage/"auto" length vocabulary.
Resolution requires a definite percentage basis when a percentage is used.
MeasureInput
Section titled “MeasureInput”MeasureInput describes an opt-in primitive’s pure measurement request.
MeasureResult
Section titled “MeasureResult”MeasureResult is the result of measureElement and distinguishes supported
measurement from an unsupported primitive capability.
OverlayStyle
Section titled “OverlayStyle”OverlayStyle is the declared shared-allocation style for Overlay children.
Percentage
Section titled “Percentage”Percentage is the public percentage-length form. It resolves only against a
definite nonnegative reference dimension.
ResolvedBoxStyle
Section titled “ResolvedBoxStyle”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.
SizingKeyword
Section titled “SizingKeyword”Sizing-only min-content and max-content vocabulary. The first experimental
owner supports horizontal min/max-content contributions.
SizingLength
Section titled “SizingLength”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.
API details from source
Section titled “API details from source”
AbsoluteStyle
Section titled “AbsoluteStyle”Supported geometry and presentation properties for Absolute.
type AbsoluteStyle = BoxStyle & LayoutItemStyleRelated API: AbsoluteStyle, BoxStyle, LayoutItemStyle.
See also
Section titled “See also”View source — packages/core/src/lib/layout/absolute.ts:69
Properties and methods
Section titled “Properties and methods”
aspectRatio (optional)
aspectRatio?: number | undefinedPositive 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.
boxSizing (optional)
boxSizing?: "border-box" | "content-box" | undefinedSelects 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.
width (optional)
width?: SizingLength | undefinedRelated API: SizingLength.
Horizontal extent in the units of the containing geometry or surface. See SizingLength.
height (optional)
height?: SizingLength | undefinedRelated API: SizingLength.
Vertical extent in the units of the containing geometry or surface. See SizingLength.
minWidth (optional)
minWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Minimum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.
maxWidth (optional)
maxWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Maximum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.
minHeight (optional)
minHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Minimum permitted height. See Length.
maxHeight (optional)
maxHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Maximum permitted height. See Length.
padding (optional)
padding?: EdgeValues<number | `${number}%`> | undefinedRelated API: EdgeValues.
Padding inside layout borders. Experimental allocated Flex percentages use owner content width for every edge. See EdgeValues, Percentage.
paddingStart (optional)
paddingStart?: number | `${number}%` | undefinedNonnegative inline-start padding overriding its physical padding edge. Experimental percentages require an allocated Flex owner and use its content width. See BoxStyle.
paddingEnd (optional)
paddingEnd?: number | `${number}%` | undefinedNonnegative inline-end padding overriding its physical padding edge. See BoxStyle.
borderWidth (optional)
borderWidth?: EdgeValues<number> | undefinedRelated API: EdgeValues.
Layout-only physical border insets, in logical pixels. Defaults to zero; does not paint a stroke. See EdgeValues.
borderStartWidth (optional)
borderStartWidth?: number | undefinedExperimental nonnegative numeric inline-start layout border overriding its physical borderWidth edge. Does not paint a stroke. See BoxStyle.
borderEndWidth (optional)
borderEndWidth?: number | undefinedExperimental nonnegative numeric inline-end layout border overriding its physical borderWidth edge. See BoxStyle.
overflow (optional)
overflow?: "clip" | "visible" | undefinedSelects "visible", "clip" for overflow. See BoxStyle.
layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefinedNumeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.
transition (optional)
transition?: PibblTransitionBinding | undefinedRelated API: PibblTransitionBinding.
Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.
custom (optional)
custom?: unknownApplication-defined style payload passed through the runtime. See SystemStyle.
filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefinedRelated API: PibblFilter.
Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.
margin (optional)
margin?: FlexMargin | undefinedRelated 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.
marginTop (optional)
marginTop?: FlexMargin | undefinedRelated API: FlexMargin.
Physical top margin overriding margin. See LayoutItemStyle.
marginRight (optional)
marginRight?: FlexMargin | undefinedRelated API: FlexMargin.
Physical right margin overriding margin. See LayoutItemStyle.
marginBottom (optional)
marginBottom?: FlexMargin | undefinedRelated API: FlexMargin.
Physical bottom margin overriding margin. See LayoutItemStyle.
marginLeft (optional)
marginLeft?: FlexMargin | undefinedRelated API: FlexMargin.
Physical left margin overriding margin. See LayoutItemStyle.
marginStart (optional)
marginStart?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.
marginEnd (optional)
marginEnd?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.
alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefinedThis child’s cross-axis or block-axis alignment override. See LayoutItemStyle.
justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefinedThis child’s inline-axis alignment override. See LayoutItemStyle.
flexBasis (optional)
flexBasis?: SizingLength | undefinedRelated API: SizingLength.
Initial main-axis size before flex growth or shrinkage. See SizingLength.
flexGrow (optional)
flexGrow?: number | undefinedRelative share of positive free space assigned to this child. See LayoutItemStyle.
flexShrink (optional)
flexShrink?: number | undefinedRelative factor used when reducing main-axis size. See LayoutItemStyle.
gridColumnStart (optional)
gridColumnStart?: number | undefinedExplicit starting grid column. See LayoutItemStyle.
gridColumnSpan (optional)
gridColumnSpan?: number | undefinedNumber of columns occupied by this child. See LayoutItemStyle.
gridRowStart (optional)
gridRowStart?: number | undefinedExplicit starting grid row. See LayoutItemStyle.
gridRowSpan (optional)
gridRowSpan?: number | undefinedNumber of rows occupied by this child. See LayoutItemStyle.
position (optional)
position?: "absolute" | "relative" | "static" | undefinedExperimental 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}%` | undefinedLeft 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}%` | undefinedRight 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}%` | undefinedTop 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}%` | undefinedBottom 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}%` | undefinedExperimental 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}%` | undefinedExperimental 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
OverlayStyle
Section titled “OverlayStyle”Supported geometry and presentation properties for Overlay.
interface OverlayStyle extends BoxStyle, LayoutItemStyleRelated API: OverlayStyle, BoxStyle, LayoutItemStyle.
See also
Section titled “See also”View source — packages/core/src/lib/layout/overlay.ts:44
Properties and methods
Section titled “Properties and methods”
alignItems (optional)
alignItems?: OverlayAlignment | undefinedDefault alignment of children on the cross or block axis. See OverlayAlignment.
justifyItems (optional)
justifyItems?: OverlayAlignment | undefinedDefault inline-axis alignment of grid or overlay children. See OverlayAlignment.
position (optional)
position?: "absolute" | "relative" | "static" | undefinedExperimental 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}%` | undefinedLeft 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}%` | undefinedRight 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}%` | undefinedTop 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}%` | undefinedBottom 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}%` | undefinedExperimental 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}%` | undefinedExperimental 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 | undefinedPositive finite width/height ratio. A declared definite axis derives the automatic axis before its bounds; boxSizing selects content or border geometry. See resolveBox.
boxSizing (optional)
boxSizing?: "border-box" | "content-box" | undefinedSelects 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.
width (optional)
width?: SizingLength | undefinedRelated API: SizingLength.
Horizontal extent in the units of the containing geometry or surface. See SizingLength.
height (optional)
height?: SizingLength | undefinedRelated API: SizingLength.
Vertical extent in the units of the containing geometry or surface. See SizingLength.
minWidth (optional)
minWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Minimum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.
maxWidth (optional)
maxWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Maximum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.
minHeight (optional)
minHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Minimum permitted height. See Length.
maxHeight (optional)
maxHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Maximum permitted height. See Length.
padding (optional)
padding?: EdgeValues<number | `${number}%`> | undefinedRelated API: EdgeValues.
Padding inside layout borders. Experimental allocated Flex percentages use owner content width for every edge. See EdgeValues, Percentage.
paddingStart (optional)
paddingStart?: number | `${number}%` | undefinedNonnegative inline-start padding overriding its physical padding edge. Experimental percentages require an allocated Flex owner and use its content width. See BoxStyle.
paddingEnd (optional)
paddingEnd?: number | `${number}%` | undefinedNonnegative inline-end padding overriding its physical padding edge. See BoxStyle.
borderWidth (optional)
borderWidth?: EdgeValues<number> | undefinedRelated API: EdgeValues.
Layout-only physical border insets, in logical pixels. Defaults to zero; does not paint a stroke. See EdgeValues.
borderStartWidth (optional)
borderStartWidth?: number | undefinedExperimental nonnegative numeric inline-start layout border overriding its physical borderWidth edge. Does not paint a stroke. See BoxStyle.
borderEndWidth (optional)
borderEndWidth?: number | undefinedExperimental nonnegative numeric inline-end layout border overriding its physical borderWidth edge. See BoxStyle.
overflow (optional)
overflow?: "clip" | "visible" | undefinedSelects "visible", "clip" for overflow. See BoxStyle.
margin (optional)
margin?: FlexMargin | undefinedRelated 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.
marginTop (optional)
marginTop?: FlexMargin | undefinedRelated API: FlexMargin.
Physical top margin overriding margin. See LayoutItemStyle.
marginRight (optional)
marginRight?: FlexMargin | undefinedRelated API: FlexMargin.
Physical right margin overriding margin. See LayoutItemStyle.
marginBottom (optional)
marginBottom?: FlexMargin | undefinedRelated API: FlexMargin.
Physical bottom margin overriding margin. See LayoutItemStyle.
marginLeft (optional)
marginLeft?: FlexMargin | undefinedRelated API: FlexMargin.
Physical left margin overriding margin. See LayoutItemStyle.
marginStart (optional)
marginStart?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.
marginEnd (optional)
marginEnd?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.
alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefinedThis child’s cross-axis or block-axis alignment override. See LayoutItemStyle.
justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefinedThis child’s inline-axis alignment override. See LayoutItemStyle.
flexBasis (optional)
flexBasis?: SizingLength | undefinedRelated API: SizingLength.
Initial main-axis size before flex growth or shrinkage. See SizingLength.
flexGrow (optional)
flexGrow?: number | undefinedRelative share of positive free space assigned to this child. See LayoutItemStyle.
flexShrink (optional)
flexShrink?: number | undefinedRelative factor used when reducing main-axis size. See LayoutItemStyle.
gridColumnStart (optional)
gridColumnStart?: number | undefinedExplicit starting grid column. See LayoutItemStyle.
gridColumnSpan (optional)
gridColumnSpan?: number | undefinedNumber of columns occupied by this child. See LayoutItemStyle.
gridRowStart (optional)
gridRowStart?: number | undefinedExplicit starting grid row. See LayoutItemStyle.
gridRowSpan (optional)
gridRowSpan?: number | undefinedNumber of rows occupied by this child. See LayoutItemStyle.
layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefinedNumeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.
transition (optional)
transition?: PibblTransitionBinding | undefinedRelated API: PibblTransitionBinding.
Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.
custom (optional)
custom?: unknownApplication-defined style payload passed through the runtime. See SystemStyle.
filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefinedRelated API: PibblFilter.
Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.
FlowProps
Section titled “FlowProps”Authored inputs for Flow, including the declared data and presentation options.
interface FlowProps extends PibblStructuralEventPropsRelated API: FlowProps.
See also
Section titled “See also”View source — packages/core/src/lib/layout/flow.ts:74
Properties and methods
Section titled “Properties and methods”
children
children: PibblNodeInputRelated API: PibblNodeInput.
Descendant content or the callback that supplies it. See PibblNodeInput.
FlowStyle
Section titled “FlowStyle”Supported geometry and presentation properties for Flow.
interface FlowStyle extends BoxStyle, LayoutItemStyleRelated API: FlowStyle, BoxStyle, LayoutItemStyle.
See also
Section titled “See also”View source — packages/core/src/lib/layout/flow.ts:55
Properties and methods
Section titled “Properties and methods”
direction (optional)
direction?: FlowDirection | undefinedDirection in which this operation proceeds. See FlowDirection.
wrap (optional)
wrap?: boolean | undefinedWhether content may wrap into additional lines. See FlowStyle.
gap (optional)
gap?: number | undefinedSpacing between adjacent items. See FlowStyle.
lineGap (optional)
lineGap?: number | undefinedSpace between wrapped flow lines. See FlowStyle.
alignItems (optional)
alignItems?: FlowAlignment | undefinedDefault alignment of children on the cross or block axis. See FlowAlignment.
aspectRatio (optional)
aspectRatio?: number | undefinedPositive finite width/height ratio. A declared definite axis derives the automatic axis before its bounds; boxSizing selects content or border geometry. See resolveBox.
layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefinedNumeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.
position (optional)
position?: "absolute" | "relative" | "static" | undefinedExperimental 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}%` | undefinedLeft 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}%` | undefinedRight 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}%` | undefinedTop 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}%` | undefinedBottom 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}%` | undefinedExperimental 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}%` | undefinedExperimental 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" | undefinedSelects 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.
width (optional)
width?: SizingLength | undefinedRelated API: SizingLength.
Horizontal extent in the units of the containing geometry or surface. See SizingLength.
height (optional)
height?: SizingLength | undefinedRelated API: SizingLength.
Vertical extent in the units of the containing geometry or surface. See SizingLength.
minWidth (optional)
minWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Minimum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.
maxWidth (optional)
maxWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Maximum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.
minHeight (optional)
minHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Minimum permitted height. See Length.
maxHeight (optional)
maxHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Maximum permitted height. See Length.
padding (optional)
padding?: EdgeValues<number | `${number}%`> | undefinedRelated API: EdgeValues.
Padding inside layout borders. Experimental allocated Flex percentages use owner content width for every edge. See EdgeValues, Percentage.
paddingStart (optional)
paddingStart?: number | `${number}%` | undefinedNonnegative inline-start padding overriding its physical padding edge. Experimental percentages require an allocated Flex owner and use its content width. See BoxStyle.
paddingEnd (optional)
paddingEnd?: number | `${number}%` | undefinedNonnegative inline-end padding overriding its physical padding edge. See BoxStyle.
borderWidth (optional)
borderWidth?: EdgeValues<number> | undefinedRelated API: EdgeValues.
Layout-only physical border insets, in logical pixels. Defaults to zero; does not paint a stroke. See EdgeValues.
borderStartWidth (optional)
borderStartWidth?: number | undefinedExperimental nonnegative numeric inline-start layout border overriding its physical borderWidth edge. Does not paint a stroke. See BoxStyle.
borderEndWidth (optional)
borderEndWidth?: number | undefinedExperimental nonnegative numeric inline-end layout border overriding its physical borderWidth edge. See BoxStyle.
overflow (optional)
overflow?: "clip" | "visible" | undefinedSelects "visible", "clip" for overflow. See BoxStyle.
margin (optional)
margin?: FlexMargin | undefinedRelated 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.
marginTop (optional)
marginTop?: FlexMargin | undefinedRelated API: FlexMargin.
Physical top margin overriding margin. See LayoutItemStyle.
marginRight (optional)
marginRight?: FlexMargin | undefinedRelated API: FlexMargin.
Physical right margin overriding margin. See LayoutItemStyle.
marginBottom (optional)
marginBottom?: FlexMargin | undefinedRelated API: FlexMargin.
Physical bottom margin overriding margin. See LayoutItemStyle.
marginLeft (optional)
marginLeft?: FlexMargin | undefinedRelated API: FlexMargin.
Physical left margin overriding margin. See LayoutItemStyle.
marginStart (optional)
marginStart?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.
marginEnd (optional)
marginEnd?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.
alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefinedThis child’s cross-axis or block-axis alignment override. See LayoutItemStyle.
justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefinedThis child’s inline-axis alignment override. See LayoutItemStyle.
flexBasis (optional)
flexBasis?: SizingLength | undefinedRelated API: SizingLength.
Initial main-axis size before flex growth or shrinkage. See SizingLength.
flexGrow (optional)
flexGrow?: number | undefinedRelative share of positive free space assigned to this child. See LayoutItemStyle.
flexShrink (optional)
flexShrink?: number | undefinedRelative factor used when reducing main-axis size. See LayoutItemStyle.
gridColumnStart (optional)
gridColumnStart?: number | undefinedExplicit starting grid column. See LayoutItemStyle.
gridColumnSpan (optional)
gridColumnSpan?: number | undefinedNumber of columns occupied by this child. See LayoutItemStyle.
gridRowStart (optional)
gridRowStart?: number | undefinedExplicit starting grid row. See LayoutItemStyle.
gridRowSpan (optional)
gridRowSpan?: number | undefinedNumber of rows occupied by this child. See LayoutItemStyle.
transition (optional)
transition?: PibblTransitionBinding | undefinedRelated API: PibblTransitionBinding.
Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.
custom (optional)
custom?: unknownApplication-defined style payload passed through the runtime. See SystemStyle.
filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefinedRelated API: PibblFilter.
Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.
FlexProps
Section titled “FlexProps”Authored inputs for Flex, including the declared data and presentation options.
interface FlexProps extends PibblStructuralEventPropsRelated API: FlexProps.
See also
Section titled “See also”View source — packages/core/src/lib/layout/flex.ts:119
Properties and methods
Section titled “Properties and methods”
children
children: PibblNodeInputRelated API: PibblNodeInput.
Descendant content or the callback that supplies it. See PibblNodeInput.
FlexStyle
Section titled “FlexStyle”Supported geometry and presentation properties for Flex.
interface FlexStyle extends BoxStyle, LayoutItemStyleRelated API: FlexStyle, BoxStyle, LayoutItemStyle.
See also
Section titled “See also”View source — packages/core/src/lib/layout/flex.ts:89
Properties and methods
Section titled “Properties and methods”
layoutDirection (optional)
layoutDirection?: "ltr" | "rtl" | undefinedInherited inline direction. Roots default to LTR. See Flex.
flexDirection (optional)
flexDirection?: FlexDirection | undefinedThe main axis along which flex children are placed. See FlexDirection.
flexWrap (optional)
flexWrap?: FlexWrap | undefinedWhether children may wrap onto additional flex lines. See FlexWrap.
justifyContent (optional)
justifyContent?: "end" | "start" | MainAlignment | undefinedDistribution along the main axis. start/end follow layout direction independently of axis reversal. See MainAlignment.
alignItems (optional)
alignItems?: "end" | "start" | ItemCrossAlignment | undefinedCross alignment. start/end follow layout direction independently of wrap reversal. See CrossAlignment.
alignContent (optional)
alignContent?: "center" | "end" | "flex-end" | "flex-start" | "space-around" | "space-between" | "space-evenly" | "start" | "stretch" | undefinedDistribution of wrapped flex lines within the available cross-axis space. See CrossAlignment, MainAlignment.
gap (optional)
gap?: number | `${number}%` | undefinedNumeric spacing, or experimental allocated-axis percentages. See Percentage, FlexStyle.
rowGap (optional)
rowGap?: number | `${number}%` | undefinedPhysical row spacing; experimental percentages use content height. See Percentage, FlexStyle.
columnGap (optional)
columnGap?: number | `${number}%` | undefinedPhysical column spacing; experimental percentages use content width. See Percentage, FlexStyle.
borderStartWidth (optional)
borderStartWidth?: number | undefinedExperimental nonnegative numeric inline-start layout border overriding its physical borderWidth edge. Does not paint a stroke. See BoxStyle.
borderEndWidth (optional)
borderEndWidth?: number | undefinedExperimental nonnegative numeric inline-end layout border overriding its physical borderWidth edge. See BoxStyle.
overflow (optional)
overflow?: "clip" | "visible" | undefinedSelects "visible", "clip" for overflow. See BoxStyle.
position (optional)
position?: "absolute" | "relative" | "static" | undefinedExperimental 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}%` | undefinedLeft 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}%` | undefinedRight 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}%` | undefinedTop 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}%` | undefinedBottom 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}%` | undefinedExperimental 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}%` | undefinedExperimental 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 | undefinedPositive finite width/height ratio. A declared definite axis derives the automatic axis before its bounds; boxSizing selects content or border geometry. See resolveBox.
boxSizing (optional)
boxSizing?: "border-box" | "content-box" | undefinedSelects 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.
width (optional)
width?: SizingLength | undefinedRelated API: SizingLength.
Horizontal extent in the units of the containing geometry or surface. See SizingLength.
height (optional)
height?: SizingLength | undefinedRelated API: SizingLength.
Vertical extent in the units of the containing geometry or surface. See SizingLength.
minWidth (optional)
minWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Minimum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.
maxWidth (optional)
maxWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Maximum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.
minHeight (optional)
minHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Minimum permitted height. See Length.
maxHeight (optional)
maxHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Maximum permitted height. See Length.
padding (optional)
padding?: EdgeValues<number | `${number}%`> | undefinedRelated API: EdgeValues.
Padding inside layout borders. Experimental allocated Flex percentages use owner content width for every edge. See EdgeValues, Percentage.
paddingStart (optional)
paddingStart?: number | `${number}%` | undefinedNonnegative inline-start padding overriding its physical padding edge. Experimental percentages require an allocated Flex owner and use its content width. See BoxStyle.
paddingEnd (optional)
paddingEnd?: number | `${number}%` | undefinedNonnegative inline-end padding overriding its physical padding edge. See BoxStyle.
borderWidth (optional)
borderWidth?: EdgeValues<number> | undefinedRelated API: EdgeValues.
Layout-only physical border insets, in logical pixels. Defaults to zero; does not paint a stroke. See EdgeValues.
margin (optional)
margin?: FlexMargin | undefinedRelated 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.
marginTop (optional)
marginTop?: FlexMargin | undefinedRelated API: FlexMargin.
Physical top margin overriding margin. See LayoutItemStyle.
marginRight (optional)
marginRight?: FlexMargin | undefinedRelated API: FlexMargin.
Physical right margin overriding margin. See LayoutItemStyle.
marginBottom (optional)
marginBottom?: FlexMargin | undefinedRelated API: FlexMargin.
Physical bottom margin overriding margin. See LayoutItemStyle.
marginLeft (optional)
marginLeft?: FlexMargin | undefinedRelated API: FlexMargin.
Physical left margin overriding margin. See LayoutItemStyle.
marginStart (optional)
marginStart?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.
marginEnd (optional)
marginEnd?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.
alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefinedThis child’s cross-axis or block-axis alignment override. See LayoutItemStyle.
justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefinedThis child’s inline-axis alignment override. See LayoutItemStyle.
flexBasis (optional)
flexBasis?: SizingLength | undefinedRelated API: SizingLength.
Initial main-axis size before flex growth or shrinkage. See SizingLength.
flexGrow (optional)
flexGrow?: number | undefinedRelative share of positive free space assigned to this child. See LayoutItemStyle.
flexShrink (optional)
flexShrink?: number | undefinedRelative factor used when reducing main-axis size. See LayoutItemStyle.
gridColumnStart (optional)
gridColumnStart?: number | undefinedExplicit starting grid column. See LayoutItemStyle.
gridColumnSpan (optional)
gridColumnSpan?: number | undefinedNumber of columns occupied by this child. See LayoutItemStyle.
gridRowStart (optional)
gridRowStart?: number | undefinedExplicit starting grid row. See LayoutItemStyle.
gridRowSpan (optional)
gridRowSpan?: number | undefinedNumber of rows occupied by this child. See LayoutItemStyle.
layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefinedNumeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.
transition (optional)
transition?: PibblTransitionBinding | undefinedRelated API: PibblTransitionBinding.
Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.
custom (optional)
custom?: unknownApplication-defined style payload passed through the runtime. See SystemStyle.
filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefinedRelated API: PibblFilter.
Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.
GridTrackBreadth
Section titled “GridTrackBreadth”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.
See also
Section titled “See also”View source — packages/core/src/lib/layout/grid.ts:58
GridMinMaxTrack
Section titled “GridMinMaxTrack”A bounded Grid track whose minimum and maximum are resolved by the Grid owner.
interface GridMinMaxTrackRelated API: GridMinMaxTrack.
See also
Section titled “See also”View source — packages/core/src/lib/layout/grid.ts:64
Properties and methods
Section titled “Properties and methods”
kind
readonly kind: "minmax"Related API: minmax.
Identifies the bounded track definition. See GridMinMaxTrack.
min
readonly min: GridTrackBreadthRelated API: GridTrackBreadth.
Minimum track breadth. See GridTrackBreadth.
max
readonly max: GridTrackBreadthRelated API: GridTrackBreadth.
Maximum track breadth. See GridTrackBreadth.
GridRepeatTrack
Section titled “GridRepeatTrack”A repeated GridTrack list. auto-fill and auto-fit use the available axis size.
interface GridRepeatTrackRelated API: GridRepeatTrack.
View source — packages/core/src/lib/layout/grid.ts:74
Properties and methods
Section titled “Properties and methods”
kind
readonly kind: "repeat"Related API: repeat.
Identifies the repetition definition. See GridRepeatTrack.
count
readonly count: number | "auto-fill" | "auto-fit"Fixed count or automatic fill/fit policy. See GridRepeatTrack.
tracks
readonly tracks: readonly GridTrack[]Related API: GridTrack.
Ordered pattern to repeat. See GridTrack.
GridProps
Section titled “GridProps”Authored inputs for Grid, including the declared data and presentation options.
interface GridProps extends PibblStructuralEventPropsRelated API: GridProps.
See also
Section titled “See also”View source — packages/core/src/lib/layout/grid.ts:168
Properties and methods
Section titled “Properties and methods”
children
children: PibblNodeInputRelated API: PibblNodeInput.
Descendant content or the callback that supplies it. See PibblNodeInput.
GridStyle
Section titled “GridStyle”Supported geometry and presentation properties for Grid.
interface GridStyle extends BoxStyle, LayoutItemStyleRelated API: GridStyle, BoxStyle, LayoutItemStyle.
See also
Section titled “See also”View source — packages/core/src/lib/layout/grid.ts:139
Properties and methods
Section titled “Properties and methods”
gridTemplateColumns
gridTemplateColumns: readonly GridTrack[]Related API: GridTrack.
Explicit grid column track definitions. See GridTrack.
gridTemplateRows
gridTemplateRows: readonly GridTrack[]Related API: GridTrack.
Explicit grid row track definitions. See GridTrack.
justifyItems (optional)
justifyItems?: GridAlignment | undefinedDefault inline-axis alignment of grid or overlay children. See GridAlignment.
alignItems (optional)
alignItems?: GridAlignment | undefinedDefault alignment of children on the cross or block axis. See GridAlignment.
gridAutoFlow (optional)
gridAutoFlow?: "column" | "column dense" | "row" | "row dense" | undefinedPlacement direction and dense-packing policy for automatically placed children.
gridAutoColumns (optional)
gridAutoColumns?: GridTrack | undefinedRelated API: GridTrack.
Track used when automatic placement creates an implicit column.
gridAutoRows (optional)
gridAutoRows?: GridTrack | undefinedRelated API: GridTrack.
Track used when automatic placement creates an implicit row.
gap (optional)
gap?: number | undefinedSpacing between adjacent items. See GridStyle.
rowGap (optional)
rowGap?: number | undefinedSpace between adjacent rows or items on the row axis. See GridStyle.
columnGap (optional)
columnGap?: number | undefinedSpace between adjacent columns or items on the column axis. See GridStyle.
margin (optional)
margin?: FlexMargin | undefinedRelated 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.
marginTop (optional)
marginTop?: FlexMargin | undefinedRelated API: FlexMargin.
Physical top margin overriding margin. See LayoutItemStyle.
marginRight (optional)
marginRight?: FlexMargin | undefinedRelated API: FlexMargin.
Physical right margin overriding margin. See LayoutItemStyle.
marginBottom (optional)
marginBottom?: FlexMargin | undefinedRelated API: FlexMargin.
Physical bottom margin overriding margin. See LayoutItemStyle.
position (optional)
position?: "absolute" | "relative" | "static" | undefinedExperimental 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}%` | undefinedLeft 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}%` | undefinedRight 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}%` | undefinedTop 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}%` | undefinedBottom 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}%` | undefinedExperimental 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}%` | undefinedExperimental 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 | undefinedPositive finite width/height ratio. A declared definite axis derives the automatic axis before its bounds; boxSizing selects content or border geometry. See resolveBox.
boxSizing (optional)
boxSizing?: "border-box" | "content-box" | undefinedSelects 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.
width (optional)
width?: SizingLength | undefinedRelated API: SizingLength.
Horizontal extent in the units of the containing geometry or surface. See SizingLength.
height (optional)
height?: SizingLength | undefinedRelated API: SizingLength.
Vertical extent in the units of the containing geometry or surface. See SizingLength.
minWidth (optional)
minWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Minimum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.
maxWidth (optional)
maxWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Maximum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.
minHeight (optional)
minHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Minimum permitted height. See Length.
maxHeight (optional)
maxHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Maximum permitted height. See Length.
padding (optional)
padding?: EdgeValues<number | `${number}%`> | undefinedRelated API: EdgeValues.
Padding inside layout borders. Experimental allocated Flex percentages use owner content width for every edge. See EdgeValues, Percentage.
paddingStart (optional)
paddingStart?: number | `${number}%` | undefinedNonnegative inline-start padding overriding its physical padding edge. Experimental percentages require an allocated Flex owner and use its content width. See BoxStyle.
paddingEnd (optional)
paddingEnd?: number | `${number}%` | undefinedNonnegative inline-end padding overriding its physical padding edge. See BoxStyle.
borderWidth (optional)
borderWidth?: EdgeValues<number> | undefinedRelated API: EdgeValues.
Layout-only physical border insets, in logical pixels. Defaults to zero; does not paint a stroke. See EdgeValues.
borderStartWidth (optional)
borderStartWidth?: number | undefinedExperimental nonnegative numeric inline-start layout border overriding its physical borderWidth edge. Does not paint a stroke. See BoxStyle.
borderEndWidth (optional)
borderEndWidth?: number | undefinedExperimental nonnegative numeric inline-end layout border overriding its physical borderWidth edge. See BoxStyle.
overflow (optional)
overflow?: "clip" | "visible" | undefinedSelects "visible", "clip" for overflow. See BoxStyle.
marginLeft (optional)
marginLeft?: FlexMargin | undefinedRelated API: FlexMargin.
Physical left margin overriding margin. See LayoutItemStyle.
marginStart (optional)
marginStart?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.
marginEnd (optional)
marginEnd?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.
alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefinedThis child’s cross-axis or block-axis alignment override. See LayoutItemStyle.
justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefinedThis child’s inline-axis alignment override. See LayoutItemStyle.
flexBasis (optional)
flexBasis?: SizingLength | undefinedRelated API: SizingLength.
Initial main-axis size before flex growth or shrinkage. See SizingLength.
flexGrow (optional)
flexGrow?: number | undefinedRelative share of positive free space assigned to this child. See LayoutItemStyle.
flexShrink (optional)
flexShrink?: number | undefinedRelative factor used when reducing main-axis size. See LayoutItemStyle.
gridColumnStart (optional)
gridColumnStart?: number | undefinedExplicit starting grid column. See LayoutItemStyle.
gridColumnSpan (optional)
gridColumnSpan?: number | undefinedNumber of columns occupied by this child. See LayoutItemStyle.
gridRowStart (optional)
gridRowStart?: number | undefinedExplicit starting grid row. See LayoutItemStyle.
gridRowSpan (optional)
gridRowSpan?: number | undefinedNumber of rows occupied by this child. See LayoutItemStyle.
layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefinedNumeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.
transition (optional)
transition?: PibblTransitionBinding | undefinedRelated API: PibblTransitionBinding.
Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.
custom (optional)
custom?: unknownApplication-defined style payload passed through the runtime. See SystemStyle.
filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefinedRelated API: PibblFilter.
Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.
GridTrack
Section titled “GridTrack”A fixed logical size, percentage, fraction, intrinsic breadth, minmax, or repeat track. See GridTrackBreadth, GridMinMaxTrack, GridRepeatTrack.
type GridTrack = GridTrackBreadth | GridMinMaxTrack | GridRepeatTrackRelated API: GridTrack, GridTrackBreadth, GridMinMaxTrack, GridRepeatTrack.
View source — packages/core/src/lib/layout/grid.ts:84
BoxStyle
Section titled “BoxStyle”Declared box dimensions, size limits, padding, and overflow behavior.
interface BoxStyle extends SystemStyleRelated API: BoxStyle, SystemStyle.
See also
Section titled “See also”View source — packages/core/src/lib/style/types.ts:82
Properties and methods
Section titled “Properties and methods”
aspectRatio (optional)
aspectRatio?: number | undefinedPositive finite width/height ratio. A declared definite axis derives the automatic axis before its bounds; boxSizing selects content or border geometry. See resolveBox.
boxSizing (optional)
boxSizing?: "border-box" | "content-box" | undefinedSelects 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.
width (optional)
width?: SizingLength | undefinedRelated API: SizingLength.
Horizontal extent in the units of the containing geometry or surface. See SizingLength.
height (optional)
height?: SizingLength | undefinedRelated API: SizingLength.
Vertical extent in the units of the containing geometry or surface. See SizingLength.
minWidth (optional)
minWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Minimum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.
maxWidth (optional)
maxWidth?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Maximum permitted horizontal width. Finite horizontal Flex intrinsic owners also accept intrinsic sizing requests; automatic remains invalid. See SizingLength.
minHeight (optional)
minHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Minimum permitted height. See Length.
maxHeight (optional)
maxHeight?: number | "stretch" | FitContent | `${number}%` | SizingKeyword | undefinedRelated API: FitContent, SizingKeyword.
Maximum permitted height. See Length.
padding (optional)
padding?: EdgeValues<number | `${number}%`> | undefinedRelated API: EdgeValues.
Padding inside layout borders. Experimental allocated Flex percentages use owner content width for every edge. See EdgeValues, Percentage.
paddingStart (optional)
paddingStart?: number | `${number}%` | undefinedNonnegative inline-start padding overriding its physical padding edge. Experimental percentages require an allocated Flex owner and use its content width. See BoxStyle.
paddingEnd (optional)
paddingEnd?: number | `${number}%` | undefinedNonnegative inline-end padding overriding its physical padding edge. See BoxStyle.
borderWidth (optional)
borderWidth?: EdgeValues<number> | undefinedRelated API: EdgeValues.
Layout-only physical border insets, in logical pixels. Defaults to zero; does not paint a stroke. See EdgeValues.
borderStartWidth (optional)
borderStartWidth?: number | undefinedExperimental nonnegative numeric inline-start layout border overriding its physical borderWidth edge. Does not paint a stroke. See BoxStyle.
borderEndWidth (optional)
borderEndWidth?: number | undefinedExperimental nonnegative numeric inline-end layout border overriding its physical borderWidth edge. See BoxStyle.
overflow (optional)
overflow?: "clip" | "visible" | undefinedSelects "visible", "clip" for overflow. See BoxStyle.
layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefinedNumeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.
transition (optional)
transition?: PibblTransitionBinding | undefinedRelated API: PibblTransitionBinding.
Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.
custom (optional)
custom?: unknownApplication-defined style payload passed through the runtime. See SystemStyle.
filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefinedRelated API: PibblFilter.
Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.
EdgeValues
Section titled “EdgeValues”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.
Type parameters
Section titled “Type parameters”T— Permitted edge values; defaults to numeric insets. Padding may opt into Percentage.
See also
Section titled “See also”View source — packages/core/src/lib/style/types.ts:59
FlexItemStyle
Section titled “FlexItemStyle”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.
See also
Section titled “See also”View source — packages/core/src/lib/style/types.ts:184
Properties and methods
Section titled “Properties and methods”
position (optional)
position?: "absolute" | "relative" | "static" | undefinedExperimental 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}%` | undefinedLeft 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}%` | undefinedRight 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}%` | undefinedTop 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}%` | undefinedBottom 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}%` | undefinedExperimental 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}%` | undefinedExperimental 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 | undefinedPositive 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.
margin (optional)
margin?: FlexMargin | undefinedRelated 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.
marginTop (optional)
marginTop?: FlexMargin | undefinedRelated API: FlexMargin.
Physical top margin overriding margin. See LayoutItemStyle.
marginRight (optional)
marginRight?: FlexMargin | undefinedRelated API: FlexMargin.
Physical right margin overriding margin. See LayoutItemStyle.
marginBottom (optional)
marginBottom?: FlexMargin | undefinedRelated API: FlexMargin.
Physical bottom margin overriding margin. See LayoutItemStyle.
marginLeft (optional)
marginLeft?: FlexMargin | undefinedRelated API: FlexMargin.
Physical left margin overriding margin. See LayoutItemStyle.
marginStart (optional)
marginStart?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.
marginEnd (optional)
marginEnd?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.
flexBasis (optional)
flexBasis?: SizingLength | undefinedRelated API: SizingLength.
Initial main-axis size before flex growth or shrinkage. See SizingLength.
flexGrow (optional)
flexGrow?: number | undefinedRelative share of positive free space assigned to this child. See LayoutItemStyle.
flexShrink (optional)
flexShrink?: number | undefinedRelative factor used when reducing main-axis size. See LayoutItemStyle.
alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefinedThis child’s cross-axis or block-axis alignment override. See FlexItemStyle.
FlexMargin
Section titled “FlexMargin”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
GridItemStyle
Section titled “GridItemStyle”Explicit grid cell placement, spans, and alignment of a child.
interface GridItemStyle extends SystemStyleRelated API: GridItemStyle, SystemStyle.
See also
Section titled “See also”View source — packages/core/src/lib/style/types.ts:198
Properties and methods
Section titled “Properties and methods”
gridColumnStart (optional)
gridColumnStart?: number | undefinedExplicit starting grid column. See GridItemStyle.
gridColumnSpan (optional)
gridColumnSpan?: number | undefinedNumber of columns occupied by this child. See GridItemStyle.
gridRowStart (optional)
gridRowStart?: number | undefinedExplicit starting grid row. See GridItemStyle.
gridRowSpan (optional)
gridRowSpan?: number | undefinedNumber of rows occupied by this child. See GridItemStyle.
alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "start" | "stretch" | undefinedThis child’s cross-axis or block-axis alignment override. See GridItemStyle.
justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefinedThis child’s inline-axis alignment override. See GridItemStyle.
layoutParticipation (optional)
layoutParticipation?: "contents" | "hidden" | "normal" | undefinedNumeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.
transition (optional)
transition?: PibblTransitionBinding | undefinedRelated API: PibblTransitionBinding.
Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.
custom (optional)
custom?: unknownApplication-defined style payload passed through the runtime. See SystemStyle.
filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefinedRelated API: PibblFilter.
Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.
LayoutItemStyle
Section titled “LayoutItemStyle”Parent-layout participation: positioning, self-alignment, flex sizing, and explicit grid placement.
interface LayoutItemStyle extends PositioningStyleRelated API: LayoutItemStyle.
See also
Section titled “See also”View source — packages/core/src/lib/style/types.ts:142
Properties and methods
Section titled “Properties and methods”
aspectRatio (optional)
aspectRatio?: number | undefinedPositive 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.
margin (optional)
margin?: FlexMargin | undefinedRelated 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.
marginTop (optional)
marginTop?: FlexMargin | undefinedRelated API: FlexMargin.
Physical top margin overriding margin. See LayoutItemStyle.
marginRight (optional)
marginRight?: FlexMargin | undefinedRelated API: FlexMargin.
Physical right margin overriding margin. See LayoutItemStyle.
marginBottom (optional)
marginBottom?: FlexMargin | undefinedRelated API: FlexMargin.
Physical bottom margin overriding margin. See LayoutItemStyle.
marginLeft (optional)
marginLeft?: FlexMargin | undefinedRelated API: FlexMargin.
Physical left margin overriding margin. See LayoutItemStyle.
marginStart (optional)
marginStart?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-start margin overriding the corresponding physical edge and margin shorthand in experimental Flex. Signed percentages use allocated content width. See LayoutItemStyle.
marginEnd (optional)
marginEnd?: FlexMargin | undefinedRelated API: FlexMargin.
Inline-end margin overriding the corresponding physical edge and margin shorthand in experimental Flex. See LayoutItemStyle.
alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefinedThis child’s cross-axis or block-axis alignment override. See LayoutItemStyle.
justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefinedThis child’s inline-axis alignment override. See LayoutItemStyle.
flexBasis (optional)
flexBasis?: SizingLength | undefinedRelated API: SizingLength.
Initial main-axis size before flex growth or shrinkage. See SizingLength.
flexGrow (optional)
flexGrow?: number | undefinedRelative share of positive free space assigned to this child. See LayoutItemStyle.
flexShrink (optional)
flexShrink?: number | undefinedRelative factor used when reducing main-axis size. See LayoutItemStyle.
gridColumnStart (optional)
gridColumnStart?: number | undefinedExplicit starting grid column. See LayoutItemStyle.
gridColumnSpan (optional)
gridColumnSpan?: number | undefinedNumber of columns occupied by this child. See LayoutItemStyle.
gridRowStart (optional)
gridRowStart?: number | undefinedExplicit starting grid row. See LayoutItemStyle.
gridRowSpan (optional)
gridRowSpan?: number | undefinedNumber of rows occupied by this child. See LayoutItemStyle.
position (optional)
position?: "absolute" | "relative" | "static" | undefinedExperimental 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}%` | undefinedLeft 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}%` | undefinedRight 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}%` | undefinedTop 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}%` | undefinedBottom 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}%` | undefinedExperimental 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}%` | undefinedExperimental 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" | undefinedNumeric layout participation. Hidden subtrees retain mounted ownership without geometry or paint; contents retains logical ancestry without owning a box. See SystemStyle.
transition (optional)
transition?: PibblTransitionBinding | undefinedRelated API: PibblTransitionBinding.
Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.
custom (optional)
custom?: unknownApplication-defined style payload passed through the runtime. See SystemStyle.
filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefinedRelated API: PibblFilter.
Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.
Length
Section titled “Length”A layout length in logical units, a parent-relative percentage, or automatic sizing.
type Length = number | Percentage | 'auto'Related API: Length, Percentage.
See also
Section titled “See also”View source — packages/core/src/lib/style/types.ts:34
ResolvedBoxStyle
Section titled “ResolvedBoxStyle”Resolved border and content boxes after sizing and padding are applied.
interface ResolvedBoxStyleRelated API: ResolvedBoxStyle.
See also
Section titled “See also”View source — packages/core/src/lib/style/types.ts:124
Properties and methods
Section titled “Properties and methods”
borderBox
borderBox: LayoutBoxRelated API: LayoutBox.
The resolved outer rectangle including padding. See LayoutBox.
contentBox
contentBox: LayoutBoxRelated API: LayoutBox.
The resolved rectangle available to content after padding. See LayoutBox.
Percentage
Section titled “Percentage”A percentage string resolved against the relevant parent layout dimension.
type Percentage = `${number}%`Related API: Percentage.
See also
Section titled “See also”View source — packages/core/src/lib/style/types.ts:25
FitContent
Section titled “FitContent”Immutable fit-content bound created by fitContent. See SizingLength.
interface FitContentRelated API: FitContent.
View source — packages/core/src/lib/style/sizing-length.ts:11
Properties and methods
Section titled “Properties and methods”
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
SizingKeyword
Section titled “SizingKeyword”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
SizingLength
Section titled “SizingLength”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
LayoutDiagnosticContext
Section titled “LayoutDiagnosticContext”Component and source context attached to a layout diagnostic.
interface LayoutDiagnosticContextRelated API: LayoutDiagnosticContext.
See also
Section titled “See also”View source — packages/core/src/lib/style/diagnostics.ts:13
Properties and methods
Section titled “Properties and methods”
component (optional)
component?: string | undefinedComponent identity or diagnostic name associated with this value. See LayoutDiagnosticContext.
algorithm (optional)
algorithm?: string | undefinedName of the layout algorithm producing this diagnostic or resolution. See LayoutDiagnosticContext.
constraints (optional)
constraints?: Readonly<Constraints> | undefinedRelated API: Constraints.
Sizing limits and available dimensions for this operation. See Constraints.
LayoutDiagnosticInput
Section titled “LayoutDiagnosticInput”Validation-failure details used to construct a layout diagnostic.
interface LayoutDiagnosticInput extends LayoutDiagnosticContextRelated API: LayoutDiagnosticInput, LayoutDiagnosticContext.
See also
Section titled “See also”View source — packages/core/src/lib/style/diagnostics.ts:34
Properties and methods
Section titled “Properties and methods”
property
property: stringName of the affected input property. See LayoutDiagnosticInput.
value
value: unknownValue associated with this sample, input, or result. See LayoutDiagnosticInput.
reason
reason: stringReason the operation could not produce its ordinary result. See LayoutDiagnosticInput .
component (optional)
component?: string | undefinedComponent identity or diagnostic name associated with this value. See LayoutDiagnosticContext.
algorithm (optional)
algorithm?: string | undefinedName of the layout algorithm producing this diagnostic or resolution. See LayoutDiagnosticContext.
constraints (optional)
constraints?: Readonly<Constraints> | undefinedRelated API: Constraints.
Sizing limits and available dimensions for this operation. See Constraints.
Constraints
Section titled “Constraints”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 ConstraintsRelated API: Constraints.
See also
Section titled “See also”View source — packages/core/src/lib/layout/types.ts:33
Properties and methods
Section titled “Properties and methods”
minWidth
minWidth: numberMinimum permitted width. See Constraints.
maxWidth
maxWidth: numberMaximum permitted width. See Constraints.
minHeight
minHeight: numberMinimum permitted height. See Constraints.
maxHeight
maxHeight: numberMaximum permitted height. See Constraints.
Resolved numeric insets for the four sides of a box.
interface EdgesRelated API: Edges.
See also
Section titled “See also”View source — packages/core/src/lib/layout/types.ts:78
Properties and methods
Section titled “Properties and methods”
top
top: numberTop edge value or top envelope guide. See Edges.
right
right: numberRight edge coordinate or inset. See Edges.
bottom
bottom: numberBottom edge value or bottom envelope guide. See Edges.
left
left: numberLeft edge coordinate or inset. See Edges.
LayoutBox
Section titled “LayoutBox”An axis-aligned rectangle in the layout coordinate system.
interface LayoutBox extends SizeSee also
Section titled “See also”View source — packages/core/src/lib/layout/types.ts:52
Properties and methods
Section titled “Properties and methods”
x
x: numberHorizontal coordinate or displacement in the containing coordinate system. See LayoutBox.
y
y: numberVertical coordinate or displacement in the containing coordinate system. See LayoutBox .
width
width: numberHorizontal extent in the units of the containing geometry or surface. See Size.
height
height: numberVertical extent in the units of the containing geometry or surface. See Size.
Width and height in logical Canvas units.
interface SizeRelated API: Size.
See also
Section titled “See also”View source — packages/core/src/lib/layout/types.ts:15
Properties and methods
Section titled “Properties and methods”
width
width: numberHorizontal extent in the units of the containing geometry or surface. See Size.
height
height: numberVertical extent in the units of the containing geometry or surface. See Size.
CanvasMeasurementService
Section titled “CanvasMeasurementService”Canvas text measurement services supplied to pure layout measurement.
interface CanvasMeasurementServiceRelated API: CanvasMeasurementService.
See also
Section titled “See also”View source — packages/core/src/lib/types.ts:330
Properties and methods
Section titled “Properties and methods”
measureText
measureText: (text: string, font: string) => TextMetricsMeasures text using the requested Canvas font configuration. See CanvasMeasurementService.
Parameters
Section titled “Parameters”-
text— Text to measure. -
font— Canvas font string used for measurement.
Returns
Section titled “Returns”Canvas text metrics for the supplied text and font.
measureTextAtBaseline (optional)
measureTextAtBaseline?: ((text: string, options: Readonly<{ font: string; textBaseline: CanvasTextBaseline; }>) => TextMetrics) | undefinedMeasures text with the requested Canvas baseline state. Providers that do not implement this optional capability cannot supply Text baseline composition.
Parameters
Section titled “Parameters”-
text— Text to measure. -
options— Exact Canvas font and baseline configuration. See CanvasMeasurementService.
Returns
Section titled “Returns”Canvas metrics in the requested baseline coordinate system.
MeasureInput
Section titled “MeasureInput”Declared style, props, and constraints passed to a primitive’s measurement callback.
interface MeasureInput<P, S extends SystemStyle = SystemStyle>Related API: MeasureInput, SystemStyle.
See also
Section titled “See also”View source — packages/core/src/lib/types.ts:390
Properties and methods
Section titled “Properties and methods”
props
props: Readonly<P>Component props supplied to evaluation or measurement. See MeasureInput.
style
style: Readonly<S>Declared presentation and layout properties. See NormalizedStyle.
constraints
constraints: Readonly<Constraints>Related API: Constraints.
Sizing limits and available dimensions for this operation. See Constraints.
service
service: CanvasMeasurementServiceRelated API: CanvasMeasurementService.
Measurement services available while evaluating this input. See CanvasMeasurementService.
measureElement
measureElement: (element: PibblElement<any>, constraints: Readonly<Constraints>) => MeasureResultRelated API: measureElement, PibblElement, Constraints, MeasureResult.
Measures a nested element using the current measurement context. See MeasureResult.
Parameters
Section titled “Parameters”-
element— Child element to measure. See PibblElement. -
constraints— Available dimensions in logical units. See Constraints.
Returns
Section titled “Returns”Measured dimensions or an unsupported measurement result. See MeasureResult.
IntrinsicAxisConstraints
Section titled “IntrinsicAxisConstraints”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
Properties and methods
Section titled “Properties and methods”
IntrinsicConstraints
Section titled “IntrinsicConstraints”Explicit axis availability for intrinsic measurement. See IntrinsicMeasureInput.
interface IntrinsicConstraintsRelated API: IntrinsicConstraints.
View source — packages/core/src/lib/types.ts:420
Properties and methods
Section titled “Properties and methods”
width
readonly width: IntrinsicAxisConstraintsRelated API: IntrinsicAxisConstraints.
Horizontal availability. See IntrinsicAxisConstraints.
height
readonly height: IntrinsicAxisConstraintsRelated API: IntrinsicAxisConstraints.
Vertical availability. See IntrinsicAxisConstraints.
IntrinsicMeasureInput
Section titled “IntrinsicMeasureInput”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
Properties and methods
Section titled “Properties and methods”
props
readonly props: Readonly<P>Resolved receiver inputs. See MeasureInput.
style
readonly style: Readonly<S>Normalized content style. See NormalizedStyle.
constraints
readonly constraints: Readonly<IntrinsicConstraints>Related API: IntrinsicConstraints.
Tagged available dimensions. See IntrinsicConstraints.
service
readonly service: CanvasMeasurementServiceRelated API: CanvasMeasurementService.
Pure Canvas measurements. See CanvasMeasurementService.
IntrinsicSizesResult
Section titled “IntrinsicSizesResult”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
Properties and methods
Section titled “Properties and methods”
BaselineMeasureInput
Section titled “BaselineMeasureInput”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
Properties and methods
Section titled “Properties and methods”
props
readonly props: Readonly<P>Resolved receiver inputs. See MeasureInput.
style
readonly style: Readonly<S>Normalized content style. See NormalizedStyle.
allocation
readonly allocation: Readonly<LayoutBox>Related API: LayoutBox.
Final local content allocation; origin is always { x: 0, y: 0 }. See LayoutBox.
service
readonly service: CanvasMeasurementServiceRelated API: CanvasMeasurementService.
Pure Canvas measurements. See CanvasMeasurementService.
BaselinesResult
Section titled “BaselinesResult”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.
See also
Section titled “See also”View source — packages/core/src/lib/types.ts:461
Properties and methods
Section titled “Properties and methods”
status
status: "measured" | "unsupported"Successful baseline query. See BaselinesResult. Explicit inability to supply baselines. See BaselinesResult.
MeasureResult
Section titled “MeasureResult”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.
See also
Section titled “See also”View source — packages/core/src/lib/types.ts:365
Properties and methods
Section titled “Properties and methods”
status
status: "measured" | "unsupported"The literal “measured” identifying this variant. See MeasureResult. The literal “unsupported” identifying this variant. See MeasureResult.
Implementation guidance for agents
Section titled “Implementation guidance for agents”Read the Drawing, layout, and effects companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.
Complete minimal examples
Section titled “Complete minimal examples”- Absolute and overlay layout: Position a block absolutely and center content within an overlay. Plain source
- Intrinsic sizing contracts: Typecheck paired intrinsic sizes, baseline results, and fit-content sizing values. Plain source
- Box resolution: Resolve padding, percentages, and a constrained box with typed diagnostics. Plain source
- Intrinsic measurement: Measure a Text element with a Canvas service and display its computed dimensions. Plain source
- Flow and flex layout: Stack a banner with a flexible row of marks. Plain source
- Grid and responsive style: Place marks on explicit grid tracks and apply a local width rule. Plain source
- Grid track constructors: Build fixed, repeated, auto-fill, and auto-fit grid track definitions. Plain source
- Allocated layout box: Read the current canvas allocation and draw an inset panel. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision a1dcf8e. ALPHA — NOT FOR PRODUCTION USE.