Skip to content
pixi-silk
GitHub repository
Interface

PanelOptions

import type { PanelOptions } from 'pixi-silk/ui/panel';

Options of Panel.

Properties#

PropertyTypeDescriptionDefined in
atlas?SdfAtlasGlyph atlas of the title. Default the shared one.ui/panels/Panel.ts:103
collapsed?booleanStart folded. Default false.ui/panels/Panel.ts:86
collapsible?booleanA chevron in the title bar folds the body away. Default true.ui/panels/Panel.ts:84
dock?PanelDock | nullDocks the panel to a screen edge or corner. Left and right panels span the screen height, top and bottom ones its width. Needs viewport. Default floating.ui/panels/Panel.ts:72
dockable?booleanDock when a drag ends near an edge, with a preview while it is near. Default true.ui/panels/Panel.ts:80
draggable?booleanDrag the title bar to move. Default true.ui/panels/Panel.ts:88
headerHeight?numberTitle bar height. Default 34.ui/panels/Panel.ts:99
height?numberHeight when floating or docked to a corner. Default 360.ui/panels/Panel.ts:55
insets?PanelInsetsSpace kept free along the screen edges.ui/panels/Panel.ts:78
layout?SmartLayoutFlex style of Panel.content. Default a column with a gap of 8 and a padding of 10.ui/panels/Panel.ts:97
margin?numberGap between a docked panel and the screen edge. Default 8.ui/panels/Panel.ts:76
maxHeight?numberLargest height a resize allows. Default no limit.ui/panels/Panel.ts:67
maxWidth?numberLargest width a resize allows. Default no limit.ui/panels/Panel.ts:65
minHeight?numberSmallest height a resize leaves. Default 96.ui/panels/Panel.ts:63
minWidth?numberSmallest width a resize leaves. Default 160.ui/panels/Panel.ts:61
resizable?booleanDrag the edges and corners to resize. Default true.ui/panels/Panel.ts:90
scroll?booleanThe body scrolls content when it is taller than the panel. Default true. With false, the body is a flex container as tall as the panel, for widgets that scroll themselves.ui/panels/Panel.ts:95
snapDistance?numberHow near an edge a drag docks, in the parent’s units. Default 28.ui/panels/Panel.ts:82
theme?Partial<PanelTheme>Colours, radius and font. Default the dark theme.ui/panels/Panel.ts:101
ticker?Ticker | nullTicker driving the motion. Default Ticker.shared. null for manual Panel.tick.ui/panels/Panel.ts:105
title?stringText of the title bar.ui/panels/Panel.ts:51
viewport?PanelViewportThe screen the panel docks in. Without it the panel only floats.ui/panels/Panel.ts:74
width?numberWidth in the parent’s units. Default 260.ui/panels/Panel.ts:53
x?numberLeft edge when floating. Default 0.ui/panels/Panel.ts:57
y?numberTop edge when floating. Default 0.ui/panels/Panel.ts:59