LayoutData
import type { LayoutData } from 'pixi-silk/ui/layout';
Where a SmartContainer sits on screen and how it scales, for one breakpoint. The box is in design units, and the reference resolution sets how design units map to the window.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
align? | "center" | "left" | "right" | Horizontal anchor of the design box in the window. Default center. | ui/layout/smart-container.ts:11 |
correctionOffsetX? | number | Moves the box, in design units (multiplied by the scale). Default 0. | ui/layout/smart-container.ts:35 |
correctionOffsetY? | number | Moves the box, in design units (multiplied by the scale). Default 0. | ui/layout/smart-container.ts:37 |
correctionScaleX? | number | Multiplies the x scale. Default 1. | ui/layout/smart-container.ts:31 |
correctionScaleY? | number | Multiplies the y scale. Default 1. | ui/layout/smart-container.ts:33 |
extendHeight? | boolean | Keep the uniform scale and make the box as tall as the window. Default false. | ui/layout/smart-container.ts:29 |
extendWidth? | boolean | Keep the uniform scale and widen the box to the window instead. Flex children spread out. Default false. | ui/layout/smart-container.ts:27 |
fitCover? | boolean | Scale to cover the window (the larger ratio) instead of fitting inside it. Default false. | ui/layout/smart-container.ts:39 |
height? | number | Height of the design box, in design units. Default 0. | ui/layout/smart-container.ts:17 |
ignoreSafeArea? | boolean | Place the box in the whole window, under notches and home bars. Default false. | ui/layout/smart-container.ts:41 |
layout? | SmartLayout | Flex style for the children inside the design box. Default the container’s layout. | ui/layout/smart-container.ts:43 |
stretchHeight? | boolean | Scale the y axis so the box spans the window height. Distorts the content. Needs a nonzero height. Default false. | ui/layout/smart-container.ts:25 |
stretchWidth? | boolean | Scale the x axis so the box spans the window width. Distorts the content. Needs a nonzero width. Default false. | ui/layout/smart-container.ts:23 |
valign? | "center" | "top" | "bottom" | Vertical anchor of the design box in the window. Default center. | ui/layout/smart-container.ts:13 |
viewportHeight? | number | Reference resolution height. Default 1920 in portrait, 1080 in landscape. | ui/layout/smart-container.ts:21 |
viewportWidth? | number | Reference resolution width. Default 1080 in portrait, 1920 in landscape. | ui/layout/smart-container.ts:19 |
width? | number | Width of the design box, in design units. Default 0. | ui/layout/smart-container.ts:15 |