# GridLayoutElementProperty

An element within a grid layout.

- Source: Generated at build time
- Type last changed: v2.272.0 · 30 Sep 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_quicksight as quicksight } from 'aws-cdk-lib';
const gridLayoutElementProperty: quicksight.CfnAnalysis.GridLayoutElementProperty = {
  columnSpan: 123,
  elementId: 'elementId',
  elementType: 'elementType',
  rowSpan: 123,

  // the properties below are optional
  backgroundStyle: {
    color: 'color',
    visibility: 'visibility',
  },
  borderRadius: 'borderRadius',
  borderStyle: {
    color: 'color',
    visibility: 'visibility',
    width: 'width',
  },
  columnIndex: 123,
  loadingAnimation: {
    visibility: 'visibility',
  },
  padding: 'padding',
  rowIndex: 123,
  selectedBorderStyle: {
    color: 'color',
    visibility: 'visibility',
    width: 'width',
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_quicksight as quicksight

grid_layout_element_property = quicksight.CfnAnalysis.GridLayoutElementProperty(
    column_span=123,
    element_id="elementId",
    element_type="elementType",
    row_span=123,

    # the properties below are optional
    background_style=quicksight.CfnAnalysis.GridLayoutElementBackgroundStyleProperty(
        color="color",
        visibility="visibility"
    ),
    border_radius="borderRadius",
    border_style=quicksight.CfnAnalysis.GridLayoutElementBorderStyleProperty(
        color="color",
        visibility="visibility",
        width="width"
    ),
    column_index=123,
    loading_animation=quicksight.CfnAnalysis.LoadingAnimationProperty(
        visibility="visibility"
    ),
    padding="padding",
    row_index=123,
    selected_border_style=quicksight.CfnAnalysis.GridLayoutElementBorderStyleProperty(
        color="color",
        visibility="visibility",
        width="width"
    )
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.quicksight.*;

GridLayoutElementProperty gridLayoutElementProperty = GridLayoutElementProperty.builder()
        .columnSpan(123)
        .elementId("elementId")
        .elementType("elementType")
        .rowSpan(123)

        // the properties below are optional
        .backgroundStyle(GridLayoutElementBackgroundStyleProperty.builder()
                .color("color")
                .visibility("visibility")
                .build())
        .borderRadius("borderRadius")
        .borderStyle(GridLayoutElementBorderStyleProperty.builder()
                .color("color")
                .visibility("visibility")
                .width("width")
                .build())
        .columnIndex(123)
        .loadingAnimation(LoadingAnimationProperty.builder()
                .visibility("visibility")
                .build())
        .padding("padding")
        .rowIndex(123)
        .selectedBorderStyle(GridLayoutElementBorderStyleProperty.builder()
                .color("color")
                .visibility("visibility")
                .width("width")
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.QuickSight;

var gridLayoutElementProperty = new GridLayoutElementProperty {
    ColumnSpan = 123,
    ElementId = "elementId",
    ElementType = "elementType",
    RowSpan = 123,

    // the properties below are optional
    BackgroundStyle = new GridLayoutElementBackgroundStyleProperty {
        Color = "color",
        Visibility = "visibility"
    },
    BorderRadius = "borderRadius",
    BorderStyle = new GridLayoutElementBorderStyleProperty {
        Color = "color",
        Visibility = "visibility",
        Width = "width"
    },
    ColumnIndex = 123,
    LoadingAnimation = new LoadingAnimationProperty {
        Visibility = "visibility"
    },
    Padding = "padding",
    RowIndex = 123,
    SelectedBorderStyle = new GridLayoutElementBorderStyleProperty {
        Color = "color",
        Visibility = "visibility",
        Width = "width"
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

gridLayoutElementProperty := &GridLayoutElementProperty{
	ColumnSpan: jsii.Number(123),
	ElementId: jsii.String("elementId"),
	ElementType: jsii.String("elementType"),
	RowSpan: jsii.Number(123),

	// the properties below are optional
	BackgroundStyle: &GridLayoutElementBackgroundStyleProperty{
		Color: jsii.String("color"),
		Visibility: jsii.String("visibility"),
	},
	BorderRadius: jsii.String("borderRadius"),
	BorderStyle: &GridLayoutElementBorderStyleProperty{
		Color: jsii.String("color"),
		Visibility: jsii.String("visibility"),
		Width: jsii.String("width"),
	},
	ColumnIndex: jsii.Number(123),
	LoadingAnimation: &LoadingAnimationProperty{
		Visibility: jsii.String("visibility"),
	},
	Padding: jsii.String("padding"),
	RowIndex: jsii.Number(123),
	SelectedBorderStyle: &GridLayoutElementBorderStyleProperty{
		Color: jsii.String("color"),
		Visibility: jsii.String("visibility"),
		Width: jsii.String("width"),
	},
}
```

## Properties

- `backgroundStyle`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAnalysis.GridLayoutElementBackgroundStyleProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_quicksight.CfnAnalysis.GridLayoutElementBackgroundStyleProperty.html)

- `borderRadius`: string

- `borderStyle`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAnalysis.GridLayoutElementBorderStyleProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_quicksight.CfnAnalysis.GridLayoutElementBorderStyleProperty.html)

- `columnIndex`: number — The column index for the upper left corner of an element.

- `columnSpan`: number (required) — The width of a grid element expressed as a number of grid columns.

- `elementId`: string (required) — A unique identifier for an element within a grid layout.

- `elementType`: string (required) — The type of element.

- `loadingAnimation`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAnalysis.LoadingAnimationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_quicksight.CfnAnalysis.LoadingAnimationProperty.html)

- `padding`: string

- `rowIndex`: number — The row index for the upper left corner of an element.

- `rowSpan`: number (required) — The height of a grid element expressed as a number of grid rows.

- `selectedBorderStyle`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAnalysis.GridLayoutElementBorderStyleProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_quicksight.CfnAnalysis.GridLayoutElementBorderStyleProperty.html)
