Skip to content

Interface: StyleProperties ​

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

Component style dictionary (the style constructor option, or assigning the whole object with component.style = {...}). Each value is a string or a number: any other value (null, undefined, a boolean, an object, an array) leaves the property unset. A value the property can't use (width: 'wide', display: 'grid') is kept, and laid out as if unset. The enumerable properties are read once each, inherited ones too, as for…in lists them; one that can't be read (its getter throws) is left out, and other names are ignored.

Properties ​

alignContent? ​

ts
optional alignContent?: AlignContent;

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

Cross axis alignment of lines; defaults to stretch


alignItems? ​

ts
optional alignItems?: Align;

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

Cross axis alignment of children; defaults to stretch


alignSelf? ​

ts
optional alignSelf?: Align;

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

Cross axis alignment of this item; defaults to auto


aspectRatio? ​

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

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

Aspect ratio


backgroundColor? ​

ts
optional backgroundColor?: StyleColor;

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

Background color


bottom? ​

ts
optional bottom?: StyleLength;

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

Bottom offset


boxSizing? ​

ts
optional boxSizing?: BoxSizing;

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

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


columnGap? ​

ts
optional columnGap?: StyleLength;

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

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:209

Layout direction; defaults to ltr


display? ​

ts
optional display?: Display;

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

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:243

End edge offset (follows direction)


flex? ​

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

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

flex shorthand (numbers only)


flexBasis? ​

ts
optional flexBasis?: StyleLength;

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

Main axis base size; defaults to auto


flexDirection? ​

ts
optional flexDirection?: FlexDirection;

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

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:227

Grow factor


flexShrink? ​

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

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

Shrink factor; defaults to 1


flexWrap? ​

ts
optional flexWrap?: FlexWrap;

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

Wrapping behavior; defaults to no-wrap


gap? ​

ts
optional gap?: StyleLength;

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

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:271

Height; defaults to auto


imageRendering? ​

ts
optional imageRendering?: ImageRendering;

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

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:213

Main axis alignment; defaults to flex-start


left? ​

ts
optional left?: StyleLength;

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

Left offset


marginBottom? ​

ts
optional marginBottom?: StyleLength;

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

Bottom margin


marginEnd? ​

ts
optional marginEnd?: StyleLength;

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

End edge margin


marginLeft? ​

ts
optional marginLeft?: StyleLength;

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

Left margin


marginRight? ​

ts
optional marginRight?: StyleLength;

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

Right margin


marginStart? ​

ts
optional marginStart?: StyleLength;

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

Start edge margin


marginTop? ​

ts
optional marginTop?: StyleLength;

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

Top margin


maxHeight? ​

ts
optional maxHeight?: StyleLength;

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

Maximum height


maxWidth? ​

ts
optional maxWidth?: StyleLength;

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

Maximum width


minHeight? ​

ts
optional minHeight?: StyleLength;

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

Minimum height


minWidth? ​

ts
optional minWidth?: StyleLength;

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

Minimum width


opacity? ​

ts
optional opacity?: number;

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

Opacity from 0 to 1; defaults to 1


overflow? ​

ts
optional overflow?: Overflow;

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

Overflow behavior; defaults to hidden


paddingBottom? ​

ts
optional paddingBottom?: StyleLength;

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

Bottom padding


paddingEnd? ​

ts
optional paddingEnd?: StyleLength;

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

End edge padding


paddingLeft? ​

ts
optional paddingLeft?: StyleLength;

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

Left padding


paddingRight? ​

ts
optional paddingRight?: StyleLength;

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

Right padding


paddingStart? ​

ts
optional paddingStart?: StyleLength;

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

Start edge padding


paddingTop? ​

ts
optional paddingTop?: StyleLength;

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

Top padding


position? ​

ts
optional position?: PositionType;

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

Positioning type; defaults to relative


ts
optional right?: StyleLength;

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

Right offset


rowGap? ​

ts
optional rowGap?: StyleLength;

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

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:241

Start edge offset (follows direction)


top? ​

ts
optional top?: StyleLength;

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

Top offset


width? ​

ts
optional width?: StyleLength;

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

Width; defaults to auto

The SDK is released under the Apache License 2.0