Skip to content
pixi-silk
GitHub repository
Interface

SmartContainerOptions

import type { SmartContainerOptions } from 'pixi-silk/ui/layout';

Options of SmartContainer.

Extends#

Properties#

PropertyTypeDescriptionInherited fromDefined in
breakpoints?readonly Breakpoint[]Named records tested before portrait and landscape.-ui/layout/smart-container.ts:95
landscapeData?LayoutDataThe record for any other window.-ui/layout/smart-container.ts:93
layout?SmartLayoutThe container’s own flex style: direction, gap, padding and so on.FlexContainerOptions.layoutui/layout/flex-container.ts:66
onLayout?(container: FlexContainer) => voidCalled after every layout pass, on the container that ran it.FlexContainerOptions.onLayoutui/layout/flex-container.ts:72
portraitData?LayoutDataThe record for a window taller than wide.-ui/layout/smart-container.ts:91
safeArea?InsetsKeeps boxes clear of these window insets, unless a record sets ignoreSafeArea.-ui/layout/smart-container.ts:99
switchTransition?| boolean | { damping?: number; stiffness?: number; }Glide to the new place and scale when the breakpoint changes. Pass an object to tune the spring. Default false.-ui/layout/smart-container.ts:101
ticker?Ticker | nullticker defaults to Ticker.shared. Pass null to call FlexContainer.tick yourself.FlexContainerOptions.tickerui/layout/flex-container.ts:74
transition?| boolean | { damping?: number; stiffness?: number; }Glide children to new slots on a spring. true uses stiffness 170 and damping 26. Default false.FlexContainerOptions.transitionui/layout/flex-container.ts:68
viewport?ViewportSourceThe window to follow. Without one the container does not place itself. Set it later with SmartContainer.setViewport.-ui/layout/smart-container.ts:97
visible?booleanInitial visible of the container. Default true.-ui/layout/smart-container.ts:103
watch?booleanChecks the children’s bounds every frame and lays out again when they change. Default false.FlexContainerOptions.watchui/layout/flex-container.ts:70