# TextWidgetBackground

Background types available.

- Source: [`aws-cloudwatch/lib/text.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-cloudwatch/lib/text.ts#L6)
- Type last changed: v2.54.0 · 7 Dec 2022

## Example

TypeScript:

```ts
declare const dashboard: cloudwatch.Dashboard;

dashboard.addWidgets(new cloudwatch.TextWidget({
  markdown: '# Key Performance Indicators',
  background: cloudwatch.TextWidgetBackground.TRANSPARENT
}));
```

Python:

```python
# dashboard: cloudwatch.Dashboard

dashboard.add_widgets(cloudwatch.TextWidget(
    markdown="# Key Performance Indicators",
    background=cloudwatch.TextWidgetBackground.TRANSPARENT
))
```

Java:

```java
Dashboard dashboard;

dashboard.addWidgets(TextWidget.Builder.create()
        .markdown("# Key Performance Indicators")
        .background(TextWidgetBackground.TRANSPARENT)
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
Dashboard dashboard;

dashboard.AddWidgets(new TextWidget(new TextWidgetProps {
    Markdown = "# Key Performance Indicators",
    Background = TextWidgetBackground.TRANSPARENT
}));
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var dashboard Dashboard

dashboard.AddWidgets(cloudwatch.NewTextWidget(&TextWidgetProps{
	Markdown: jsii.String("# Key Performance Indicators"),
	Background: cloudwatch.TextWidgetBackground_TRANSPARENT,
}))
```

## Members

| Member | Description |
| --- | --- |
| `SOLID` | Solid background. |
| `TRANSPARENT` | Transparent background. |

## Referenced by

- [`TextWidgetProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.TextWidgetProps.html).background
