> For the complete documentation index, see [llms.txt](https://developers.felt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.felt.com/felt-style-language/style-definition-blocks/the-popup-block.md).

# The popup block

The popup block contains information on how the popup is displayed and which attributes to show.

These are the fields that each popup block can contain:

<table><thead><tr><th width="221">Field name</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td>Optional. <code>"attributes"</code> (default), <code>"iframe"</code>, or <code>"html"</code>.</td></tr><tr><td><code>titleAttribute</code></td><td>Optional. The attribute (or attributes) used to title the popup if available.</td></tr><tr><td><code>imageAttribute</code></td><td>Optional. The attribute that will be used to populate the popup image if available.</td></tr><tr><td><code>popupLayout</code></td><td>Optional. One of <code>"table"</code> or <code>"list"</code>. The way the popup shows its contents. Defaults to <code>"table"</code>.</td></tr><tr><td><code>popupLocation</code></td><td>Optional. Where the popup appears: <code>"onMap"</code>, <code>"leftSidebar"</code>, <code>"rightSidebar"</code>, or <code>"modal"</code>.</td></tr><tr><td><code>headerLayout</code></td><td>Optional. <code>"standard"</code>, <code>"compact"</code>, or <code>"none"</code>.</td></tr><tr><td><code>keyAttributes</code></td><td>Optional. A list of attributes to show in the popup following the order defined here. If it’s not defined, only attributes with a value will show. If it’s defined, all listed attributes show even when the selected feature doesn’t include them.</td></tr><tr><td><code>url</code></td><td>Iframe popups only. The URL to embed; supports the <code>{{column_name}}</code> template syntax.</td></tr><tr><td><code>width</code></td><td><code>iframe</code> and <code>html</code> popups only. The popup width in pixels.</td></tr><tr><td><code>height</code></td><td><code>iframe</code> and <code>html</code> popups only. The popup height in pixels.</td></tr></tbody></table>

{% code title="Example of a popup block" %}

```json
"popup": {
  "titleAttribute": "name",
  "keyAttributes": ["osm_id", "highway", "ref", "place"],
  "popupLayout": "list",
  "popupLocation": "onMap",
  "headerLayout": "standard"
}
```

{% endcode %}

## Iframe and HTML popups

An `iframe` popup embeds external content. Use the template syntax `{{column_name}}` (or `{{['Column Name']}}` for names with spaces) to inject feature values into the URL or HTML.

An `html` popup renders a rich HTML template that is authored and stored with the layer in the Felt app — the FSL block only sets `"type": "html"` plus the common fields above; the template itself is not part of the style.

{% code title="Iframe popup" %}

```json
"popup": {
  "type": "iframe",
  "url": "https://example.com/details/{{id}}",
  "popupLocation": "modal",
  "width": 600,
  "height": 800
}
```

{% endcode %}

## H3 aggregation attributes

[H3](/felt-style-language/types-of-visualizations/h3.md) hexes show **aggregated** values rather than raw feature attributes, so their popups reference special attribute names:

* `"felt:cluster_size"` — number of features in the hex
* `"felt:sum:column"`, `"felt:mean:column"`, `"felt:min:column"`, `"felt:max:column"` — aggregates of `column`

```json
"popup": {
  "titleAttribute": "felt:sum:revenue",
  "keyAttributes": ["felt:cluster_size", "felt:mean:revenue", "felt:max:revenue"]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.felt.com/felt-style-language/style-definition-blocks/the-popup-block.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
