---
title: Collapse content
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Cdocs e2e tests > Collapse content
---

# Collapse content

## Overview{% #overview %}

This page contains examples of the collapse content component.

## Examples{% #examples %}

### Expanded by default{% #expanded-by-default %}

{% collapsible-section #collapse-expanded-h4 open=null %}
#### Expanded section (h4)

This section is expanded by default. Click the title to collapse it.
{% /collapsible-section %}

### Collapsed by default{% #collapsed-by-default %}

{% collapsible-section #collapse-collapsed-h4 %}
#### Collapsed section (h4)

This section is collapsed by default. Click the title to expand it.
{% /collapsible-section %}

### Heading level h1{% #heading-level-h1 %}

{% collapsible-section #collapse-h1 %}
# H1 collapse

This collapsible section uses an h1 heading level.
{% /collapsible-section %}

### Heading level h2{% #heading-level-h2 %}

{% collapsible-section #collapse-h2 %}
## H2 collapse

This collapsible section uses an h2 heading level.
{% /collapsible-section %}

### Heading level h3{% #heading-level-h3 %}

{% collapsible-section #collapse-h3 %}
### H3 collapse

This collapsible section uses an h3 heading level.
{% /collapsible-section %}

### Heading level h5{% #heading-level-h5 %}

{% collapsible-section #collapse-h5 %}
##### H5 collapse

This collapsible section uses an h5 heading level.
{% /collapsible-section %}

### With rich content inside{% #with-rich-content-inside %}

{% collapsible-section #collapse-rich %}
#### Configuration example

To configure the Agent, update the following settings:

In the `datadog.yaml` file:

```
api_key: YOUR_API_KEY
logs_enabled: true
```

{% alert level="info" %}
Restart the Agent after making configuration changes.
{% /alert %}

{% /collapsible-section %}
