Skip to content

Interface: StyleProperties ​

Defined in: types/desktop-engine.d.ts:180

Component style dictionary (the style constructor option, or assigning the whole object with component.style = {...})

Properties ​

alignContent? ​

ts
optional alignContent?: AlignContent;

Defined in: types/desktop-engine.d.ts:194

Cross axis alignment of lines; defaults to stretch


alignItems? ​

ts
optional alignItems?: Align;

Defined in: types/desktop-engine.d.ts:196

Cross axis alignment of children; defaults to stretch


alignSelf? ​

ts
optional alignSelf?: Align;

Defined in: types/desktop-engine.d.ts:198

Cross axis alignment of this item; defaults to auto


aspectRatio? ​

ts
optional aspectRatio?: number | `${number}`;

Defined in: types/desktop-engine.d.ts:260

Aspect ratio


backgroundColor? ​

ts
optional backgroundColor?: StyleColor;

Defined in: types/desktop-engine.d.ts:268

Background color


bottom? ​

ts
optional bottom?: StyleLength;

Defined in: types/desktop-engine.d.ts:218

Bottom offset


boxSizing? ​

ts
optional boxSizing?: BoxSizing;

Defined in: types/desktop-engine.d.ts:202

What width and height measure; defaults to border-box (unlike the web)


columnGap? ​

ts
optional columnGap?: StyleLength;

Defined in: types/desktop-engine.d.ts:266

Space between columns (items of a row, or lines of a wrapping column); overrides gap


direction? ​

ts
optional direction?: Direction;

Defined in: types/desktop-engine.d.ts:188

Layout direction; defaults to ltr


display? ​

ts
optional display?: Display;

Defined in: types/desktop-engine.d.ts:184

Display type; defaults to flex; none hides the view, contents gives its children to its parent's layout


end? ​

ts
optional end?: StyleLength;

Defined in: types/desktop-engine.d.ts:222

End edge offset (follows direction)


flex? ​

ts
optional flex?: number | `${number}`;

Defined in: types/desktop-engine.d.ts:204

flex shorthand (numbers only)


flexBasis? ​

ts
optional flexBasis?: StyleLength;

Defined in: types/desktop-engine.d.ts:210

Main axis base size; defaults to auto


flexDirection? ​

ts
optional flexDirection?: FlexDirection;

Defined in: types/desktop-engine.d.ts:190

Main axis direction; defaults to row (as on the web, unlike React Native)


flexGrow? ​

ts
optional flexGrow?: number | `${number}`;

Defined in: types/desktop-engine.d.ts:206

Grow factor


flexShrink? ​

ts
optional flexShrink?: number | `${number}`;

Defined in: types/desktop-engine.d.ts:208

Shrink factor; defaults to 1


flexWrap? ​

ts
optional flexWrap?: FlexWrap;

Defined in: types/desktop-engine.d.ts:200

Wrapping behavior; defaults to no-wrap


gap? ​

ts
optional gap?: StyleLength;

Defined in: types/desktop-engine.d.ts:262

Space between rows and between columns of children; percentages are of the container's inner size


height? ​

ts
optional height?: StyleLength;

Defined in: types/desktop-engine.d.ts:250

Height; defaults to auto


imageRendering? ​

ts
optional imageRendering?: ImageRendering;

Defined in: types/desktop-engine.d.ts:272

Canvas only: how its drawing buffer is scaled to its size; defaults to auto


justifyContent? ​

ts
optional justifyContent?: Justify;

Defined in: types/desktop-engine.d.ts:192

Main axis alignment; defaults to flex-start


left? ​

ts
optional left?: StyleLength;

Defined in: types/desktop-engine.d.ts:212

Left offset


marginBottom? ​

ts
optional marginBottom?: StyleLength;

Defined in: types/desktop-engine.d.ts:230

Bottom margin


marginEnd? ​

ts
optional marginEnd?: StyleLength;

Defined in: types/desktop-engine.d.ts:234

End edge margin


marginLeft? ​

ts
optional marginLeft?: StyleLength;

Defined in: types/desktop-engine.d.ts:224

Left margin


marginRight? ​

ts
optional marginRight?: StyleLength;

Defined in: types/desktop-engine.d.ts:228

Right margin


marginStart? ​

ts
optional marginStart?: StyleLength;

Defined in: types/desktop-engine.d.ts:232

Start edge margin


marginTop? ​

ts
optional marginTop?: StyleLength;

Defined in: types/desktop-engine.d.ts:226

Top margin


maxHeight? ​

ts
optional maxHeight?: StyleLength;

Defined in: types/desktop-engine.d.ts:258

Maximum height


maxWidth? ​

ts
optional maxWidth?: StyleLength;

Defined in: types/desktop-engine.d.ts:256

Maximum width


minHeight? ​

ts
optional minHeight?: StyleLength;

Defined in: types/desktop-engine.d.ts:254

Minimum height


minWidth? ​

ts
optional minWidth?: StyleLength;

Defined in: types/desktop-engine.d.ts:252

Minimum width


opacity? ​

ts
optional opacity?: number;

Defined in: types/desktop-engine.d.ts:270

Opacity from 0 to 1; defaults to 1


overflow? ​

ts
optional overflow?: Overflow;

Defined in: types/desktop-engine.d.ts:186

Overflow behavior; defaults to hidden


paddingBottom? ​

ts
optional paddingBottom?: StyleLength;

Defined in: types/desktop-engine.d.ts:242

Bottom padding


paddingEnd? ​

ts
optional paddingEnd?: StyleLength;

Defined in: types/desktop-engine.d.ts:246

End edge padding


paddingLeft? ​

ts
optional paddingLeft?: StyleLength;

Defined in: types/desktop-engine.d.ts:236

Left padding


paddingRight? ​

ts
optional paddingRight?: StyleLength;

Defined in: types/desktop-engine.d.ts:240

Right padding


paddingStart? ​

ts
optional paddingStart?: StyleLength;

Defined in: types/desktop-engine.d.ts:244

Start edge padding


paddingTop? ​

ts
optional paddingTop?: StyleLength;

Defined in: types/desktop-engine.d.ts:238

Top padding


position? ​

ts
optional position?: PositionType;

Defined in: types/desktop-engine.d.ts:182

Positioning type; defaults to relative


ts
optional right?: StyleLength;

Defined in: types/desktop-engine.d.ts:216

Right offset


rowGap? ​

ts
optional rowGap?: StyleLength;

Defined in: types/desktop-engine.d.ts:264

Space between rows (lines of a wrapping row, or items of a column); overrides gap


start? ​

ts
optional start?: StyleLength;

Defined in: types/desktop-engine.d.ts:220

Start edge offset (follows direction)


top? ​

ts
optional top?: StyleLength;

Defined in: types/desktop-engine.d.ts:214

Top offset


width? ​

ts
optional width?: StyleLength;

Defined in: types/desktop-engine.d.ts:248

Width; defaults to auto

The SDK is released under the Apache License 2.0