> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/tutorials/building-widgets/basics/9-placeholders.md).

# 9. Placeholders

{% hint style="info" %}
There is a download available of this widget on the [Examples](/platform/tutorials/building-widgets/examples.md) page.
{% endhint %}

If you are familiar with the Modeler and creating page templates, then you are probably acquainted with components such as Alert, Panel, Conditional, and others. To create a similar widget, we need an additional feature called Placeholders. This feature allows you to reserve a section in your widget for content that you can add in the Template Editor within the Modeler. Let's create a simplified Alert component to explain the concept of placeholders.

#### Creating the Information Card Widget

1. Create a new widget called "Information Card."
2. Select the Placeholders tab.
3. Click on "New placeholder."
4. Name it "Contents."

You can provide a label and a description if you wish; these will be displayed in the Template Editor.

5. Copy and paste the following script:

```html
<div class="alert alert-info">
	<? render @Contents ?>
</div>
```

To keep this chapter simple, we are reusing the Alert Bootstrap classes. Other than that, there is one new statement here called `render`. As the name implies, this statement will render the contents of the `@Contents` placeholder. And that's it!

Now, place this widget on a template and notice that there is an additional container that was not previously shown in the other widgets we created. Try dragging some components, adding some text, or including other widgets in this container.

As you can see, placeholders are very easy to implement and incredibly powerful.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.wem.io/platform/tutorials/building-widgets/basics/9-placeholders.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
