Skip to content

Configuration

Configuration options for PixelUI components.

PixelUI.BorderConfig

NameTypeDescription
colorPixelUI.Color?Border color
sides("top"|"right"|"bottom"|"left")[]|table<string,boolean>?Enabled sides
thicknessinteger?Pixel thickness of the border (defaults to 1)

PixelUI.AppOptions

NameTypeDescription
windowtable?Target window; defaults to the current terminal
backgroundPixelUI.Color?Root background color
rootBorderPixelUI.BorderConfig?Border applied to the root frame
animationIntervalnumber?Animation tick interval in seconds (defaults to 0.05)

PixelUI.NormalizedBorderConfig

Internal normalized border configuration.

NameTypeDescription
colorPixelUI.ColorBorder color
topbooleanShow top border
rightbooleanShow right border
bottombooleanShow bottom border
leftbooleanShow left border
thicknessintegerBorder thickness in pixels

PixelUI.ScrollbarConfig

NameTypeDescription
enabledboolean?Whether the scrollbar is enabled
alwaysVisibleboolean?Force rendering even when content fits
widthinteger?Width in characters (defaults to 1)
trackColorPixelUI.Color?Track background color
thumbColorPixelUI.Color?Thumb color
arrowColorPixelUI.Color?Arrow glyph color
backgroundPixelUI.Color?Fill color for unused areas
minThumbSizeinteger?Minimum thumb height in characters

PixelUI.NormalizedScrollbarConfig

NameTypeDescription
percentnumber?Percentage (0-1) of the referenced metric
ofstring?Reference string such as "parent.width"
offsetinteger?Offset applied after evaluation

PixelUI.ConstraintConfig

NameTypeDescription
minWidthinteger?Minimum allowed width (in characters)
maxWidthinteger?Maximum allowed width (in characters)
minHeightinteger?Minimum allowed height (in characters)
maxHeightinteger?Maximum allowed height (in characters)
width(number|string|PixelUI.DimensionConstraint|boolean)?Explicit width rule
height(number|string|PixelUI.DimensionConstraint|boolean)?Explicit height rule
widthPercentnumber?Width as a percentage (0-1 or 0-100) of the parent width
heightPercentnumber?Height as a percentage (0-1 or 0-100) of the parent height
centerX(boolean|string|PixelUI.AlignmentConstraint)?Horizontal alignment rule
centerY(boolean|string|PixelUI.AlignmentConstraint)?Vertical alignment rule
offsetXinteger?X offset applied after alignment rules
offsetYinteger?Y offset applied after alignment rules

PixelUI.NormalizedConstraintConfig

NameTypeDescription
minWidthinteger?Minimum allowed width (in characters)
maxWidthinteger?Maximum allowed width (in characters)
minHeightinteger?Minimum allowed height (in characters)
maxHeightinteger?Maximum allowed height (in characters)
widthtable?Internal descriptor for width rules
heighttable?Internal descriptor for height rules
widthPercentnumber?Normalized width percentage (0-1)
heightPercentnumber?Normalized height percentage (0-1)
centerXtable?Internal descriptor for horizontal alignment
centerYtable?Internal descriptor for vertical alignment
offsetXinteger?Horizontal offset applied after alignment
offsetYinteger?Vertical offset applied after alignment

PixelUI.ThreadOptions

Configuration options for spawning a background thread.

NameTypeDescription
namestring?Display name for the thread
onStatusfun(handle:PixelUI.ThreadHandle,
onMetadatafun(handle:PixelUI.ThreadHandle,

PixelUI.AnimationOptions

Configuration options for creating an animation.

NameTypeDescription
durationnumber?Duration in seconds (default: 1.0)
easing(fun(t:number):number)|string?Easing function or name (default: "linear")
updatefun(progress:number,
onCompletefun(handle:PixelUI.AnimationHandle?)?Callback fired when animation completes
onCancelfun(handle:PixelUI.AnimationHandle?)?Callback fired when animation is cancelled

Released under the MIT License.