Exact, flexible and content sizing
This reference documents every current public declaration in this part of Pine. Examples run inside App.Mount(), a component factory, or an explicit P.Root(...) unless they only create state/configuration. Explicit P.Mount(...) remains available for advanced ownership. Variable names such as count, items and label refer to the typed values described by each example. All APIs run on Unity’s main thread.
P.Size
public static IProperty<Component> Size(Value<Vector2> size)
Requests exact non-negative finite width and height in both RectTransform and native LayoutElement.
public static IProperty<Component> Size(float width, float height)
Requests exact non-negative finite width and height in both RectTransform and native LayoutElement.
public static IProperty<Component> Size(Func<Vector2> size)
Requests exact non-negative finite width and height in both RectTransform and native LayoutElement.
P.Width
public static IProperty<Component> Width(Value<float> width)
Requests one exact non-negative finite axis in both native rect and layout sizing.
public static IProperty<Component> Width(Func<float> width)
Requests one exact non-negative finite axis in both native rect and layout sizing.
P.Height
public static IProperty<Component> Height(Value<float> height)
Requests one exact non-negative finite axis in both native rect and layout sizing.
public static IProperty<Component> Height(Func<float> height)
Requests one exact non-negative finite axis in both native rect and layout sizing.
P.Fill
public static IProperty<Component> Fill()
Explicitly fills available space on both axes, using layout flexibility under a layout group and stretching under a plain parent.
P.FillWidth
public static IProperty<Component> FillWidth()
Fills available width, using native layout flexibility or parent stretching.
P.FillHeight
public static IProperty<Component> FillHeight()
Fills available height, using native layout flexibility or parent stretching.
P.Auto
public static IProperty<Component> Auto()
Sizes both axes from native content preference rather than specifying exact dimensions.
P.AutoWidth
public static IProperty<Component> AutoWidth()
Sizes width from native content preference.
P.AutoHeight
public static IProperty<Component> AutoHeight()
Sizes height from native content preference.
P.PreferredSize
public static IProperty<Component> PreferredSize(Value<Vector2> size)
Sets native LayoutElement preferred dimensions without imposing exact minima.
public static IProperty<Component> PreferredSize(float width, float height)
Sets native LayoutElement preferred dimensions without imposing exact minima.
public static IProperty<Component> PreferredSize(Func<Vector2> size)
Sets native LayoutElement preferred dimensions without imposing exact minima.
P.Position
public static IProperty<Component> Position(Value<Vector2> position)
Binds RectTransform.anchoredPosition.
public static IProperty<Component> Position(float x, float y)
Binds RectTransform.anchoredPosition.
public static IProperty<Component> Position(Func<Vector2> position)
Binds RectTransform.anchoredPosition.
P.Anchors
public static IProperty<Component> Anchors(Value<Vector2> minimum, Value<Vector2> maximum)
Binds normalized minimum and maximum anchors.
P.Pivot
public static IProperty<Component> Pivot(Value<Vector2> pivot)
Binds the normalized native RectTransform pivot.
public static IProperty<Component> Pivot(Func<Vector2> pivot)
Binds the normalized native RectTransform pivot.
P.Stretch
public static IProperty<Component> Stretch()
Sets anchors to zero/one and offsets to zero once.
P.Clip
public static IProperty<Component> Clip(Value<bool> enabled)
Adds or reuses RectMask2D and binds its enabled state.
public static IProperty<Component> Clip(Func<bool> enabled)
Adds or reuses RectMask2D and binds its enabled state.
P.Padding
public static IProperty<RectTransform> Padding(Value<RectOffset> padding)
Binds native horizontal/vertical layout padding on a frame.
public static IProperty<RectTransform> Padding(Func<RectOffset> padding)
Binds native horizontal/vertical layout padding on a frame.
P.VerticalProperty
public static IProperty<RectTransform> VerticalProperty()
Adds or reuses a vertical native layout group with controlled child sizing and explicit flexible expansion.
public static IProperty<RectTransform> VerticalProperty(Value<float> spacing)
Adds or reuses a vertical native layout group with controlled child sizing and explicit flexible expansion.
public static IProperty<RectTransform> VerticalProperty(Func<float> spacing)
Adds or reuses a vertical native layout group with controlled child sizing and explicit flexible expansion.
P.HorizontalProperty
public static IProperty<RectTransform> HorizontalProperty()
Adds or reuses a horizontal native layout group with controlled child sizing and explicit flexible expansion.
public static IProperty<RectTransform> HorizontalProperty(Value<float> spacing)
Adds or reuses a horizontal native layout group with controlled child sizing and explicit flexible expansion.
public static IProperty<RectTransform> HorizontalProperty(Func<float> spacing)
Adds or reuses a horizontal native layout group with controlled child sizing and explicit flexible expansion.
P.CellSize
public static IProperty<GridLayoutGroup> CellSize(Value<Vector2> size)
Binds uniform grid dimensions shared by every cell.
public static IProperty<GridLayoutGroup> CellSize(Func<Vector2> size)
Binds uniform grid dimensions shared by every cell.
P.GridSpacing
public static IProperty<GridLayoutGroup> GridSpacing(Value<Vector2> spacing)
Binds horizontal and vertical native grid spacing.
public static IProperty<GridLayoutGroup> GridSpacing(Func<Vector2> spacing)
Binds horizontal and vertical native grid spacing.
P.GridPadding
public static IProperty<GridLayoutGroup> GridPadding(Value<RectOffset> padding)
Binds native uniform-grid padding.
P.SafeAreaProperty
public static IProperty<Component> SafeAreaProperty(Value<bool> enabled)
Adds or reuses an allocation-free native safe-area follower, with reactive enablement.
public static IProperty<Component> SafeAreaProperty(Func<bool> enabled)
Adds or reuses an allocation-free native safe-area follower, with reactive enablement.
