PanelOptions
import type { PanelOptions } from 'pixi-silk/ui/panel';
Options of Panel.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
atlas? | SdfAtlas | Glyph atlas of the title. Default the shared one. | ui/panels/Panel.ts:103 |
collapsed? | boolean | Start folded. Default false. | ui/panels/Panel.ts:86 |
collapsible? | boolean | A chevron in the title bar folds the body away. Default true. | ui/panels/Panel.ts:84 |
dock? | PanelDock | null | Docks 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? | boolean | Dock when a drag ends near an edge, with a preview while it is near. Default true. | ui/panels/Panel.ts:80 |
draggable? | boolean | Drag the title bar to move. Default true. | ui/panels/Panel.ts:88 |
headerHeight? | number | Title bar height. Default 34. | ui/panels/Panel.ts:99 |
height? | number | Height when floating or docked to a corner. Default 360. | ui/panels/Panel.ts:55 |
insets? | PanelInsets | Space kept free along the screen edges. | ui/panels/Panel.ts:78 |
layout? | SmartLayout | Flex style of Panel.content. Default a column with a gap of 8 and a padding of 10. | ui/panels/Panel.ts:97 |
margin? | number | Gap between a docked panel and the screen edge. Default 8. | ui/panels/Panel.ts:76 |
maxHeight? | number | Largest height a resize allows. Default no limit. | ui/panels/Panel.ts:67 |
maxWidth? | number | Largest width a resize allows. Default no limit. | ui/panels/Panel.ts:65 |
minHeight? | number | Smallest height a resize leaves. Default 96. | ui/panels/Panel.ts:63 |
minWidth? | number | Smallest width a resize leaves. Default 160. | ui/panels/Panel.ts:61 |
resizable? | boolean | Drag the edges and corners to resize. Default true. | ui/panels/Panel.ts:90 |
scroll? | boolean | The 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? | number | How 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 | null | Ticker driving the motion. Default Ticker.shared. null for manual Panel.tick. | ui/panels/Panel.ts:105 |
title? | string | Text of the title bar. | ui/panels/Panel.ts:51 |
viewport? | PanelViewport | The screen the panel docks in. Without it the panel only floats. | ui/panels/Panel.ts:74 |
width? | number | Width in the parent’s units. Default 260. | ui/panels/Panel.ts:53 |
x? | number | Left edge when floating. Default 0. | ui/panels/Panel.ts:57 |
y? | number | Top edge when floating. Default 0. | ui/panels/Panel.ts:59 |