# IWidget

A single dashboard widget.

Implemented by: [AlarmStatusWidget](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.AlarmStatusWidget.html), [AlarmWidget](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.AlarmWidget.html), [Column](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Column.html), [ConcreteWidget](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.ConcreteWidget.html), [CustomWidget](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.CustomWidget.html), GaugeWidget, GraphWidget, LogQueryWidget, Row, SingleValueWidget, Spacer, TableWidget, TextWidget
Used as argument in: [Column (initializer)](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Column.html#initializer), [Column.addWidget](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Column.html#addwidget), [Dashboard.addWidgets](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Dashboard.html#addwidgets), Row (initializer), Row.addWidget

- Source: [`aws-cloudwatch/lib/widget.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-cloudwatch/lib/widget.ts#L13)
- Type last changed: v2.93.0 · 23 Aug 2023

## Properties

- `height`: number — The amount of vertical grid units the widget will take up.

- `warnings`: string[] — - use warningsV2

- `warningsV2`: { [key: string]: string } — Any warnings that are produced as a result of putting together this widget.

- `width`: number — The amount of horizontal grid units the widget will take up.

## Methods

- `position(x: number, y: number): void` — Place the widget at a given position.

- `toJson(): any[]` — Return the widget JSON for use in the dashboard.
