Share via


AreaGridLayout class

A layout that divides a container into named areas into which elements can be placed.

Constructors

AreaGridLayout(AreaGridLayoutOptions)

Properties

areas

The areas in the grid layout.

columns

The columns in the grid layout, defined as a percentage of the available width or in pixels using the <number>px format.

columnSpacing

The space between columns.

rowSpacing

The space between rows.

targetWidth

Controls for which card width the layout should be used.

type

Must be Layout.AreaGrid.

Methods

from(Omit<IAreaGridLayout, "type">)
withAreas(IGridArea[])
withColumns((string | number)[])
withColumnSpacing(Spacing)
withRowSpacing(Spacing)
withTargetWidth(TargetWidth)

Constructor Details

AreaGridLayout(AreaGridLayoutOptions)

new AreaGridLayout(options?: AreaGridLayoutOptions)

Parameters

Property Details

areas

The areas in the grid layout.

areas?: IGridArea[]

Property Value

columns

The columns in the grid layout, defined as a percentage of the available width or in pixels using the <number>px format.

columns?: (string | number)[]

Property Value

(string | number)[]

columnSpacing

The space between columns.

columnSpacing?: Spacing

Property Value

rowSpacing

The space between rows.

rowSpacing?: Spacing

Property Value

targetWidth

Controls for which card width the layout should be used.

targetWidth?: TargetWidth

Property Value

type

Must be Layout.AreaGrid.

type: "Layout.AreaGrid" = "Layout.AreaGrid"

Property Value

"Layout.AreaGrid"

Method Details

from(Omit<IAreaGridLayout, "type">)

static function from(options: Omit<IAreaGridLayout, "type">): AreaGridLayout

Parameters

options

Omit<IAreaGridLayout, "type">

Returns

withAreas(IGridArea[])

function withAreas(areas: IGridArea[]): AreaGridLayout

Parameters

areas

IGridArea[]

Returns

withColumns((string | number)[])

function withColumns(columns: (string | number)[]): AreaGridLayout

Parameters

columns

(string | number)[]

Returns

withColumnSpacing(Spacing)

function withColumnSpacing(columnSpacing: Spacing): AreaGridLayout

Parameters

columnSpacing
Spacing

Returns

withRowSpacing(Spacing)

function withRowSpacing(rowSpacing: Spacing): AreaGridLayout

Parameters

rowSpacing
Spacing

Returns

withTargetWidth(TargetWidth)

function withTargetWidth(targetWidth: TargetWidth): AreaGridLayout

Parameters

targetWidth
TargetWidth

Returns