> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/gum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/gum/gum-tool/gum-elements/component/default-child-container.md).

# Default Slot

{% hint style="info" %}
Previous versions of Gum called this variable `Default Child Container`. This was changed to `Default Slot` in the February 2026 release.
{% endhint %}

Default Slot specifies where children are added to instances of the selected component.

By default this value is blank, which means that newly added children treat the entire component as their parent. If Default Slot value is set, children which are dropped on instances of this component type use the Default Slot as their parent.

Default Slot is typically set on containers which are designed to hold children, but which have margins or decoration around the dedicated container instance. Examples include list boxes, tree views, and frames.

{% hint style="info" %}
The Default Slot property simplifies the addition of new children to a container. Changing this value will not change already-added children. This property is not required, since the Parent can be manually typed and set to the inner container using the "dot". See below for more information on dot assignments.
{% endhint %}

Multiple instances can act as slots. For information on using multiple slots, see the [Is Slot](/gum/gum-tool/gum-elements/general-properties/is-slot.md) page.

### Example

Consider a Component named Frame which has two instances: OuterRectangle and InnerRectangle.

<figure><img src="/files/LYAOcGeD3VoTooU131Xz" alt=""><figcaption><p>Frame component with two children</p></figcaption></figure>

This Component is designed to keep all of is children inside the InnerRectangle, so that any child automatically respects the margin specified by InnerRectangle.

To make this kind of relationship the default, the Frame can set its Default Slot property to InnerRectangle.

<figure><img src="/files/NUnHF1KIANLJGnGyaKMj" alt=""><figcaption><p>Setting the Default Child Container</p></figcaption></figure>

Once this value is set, instances which are drag+dropped onto Frame instances use the InnerRectangle as their parent, as shown in the following animation.

<figure><img src="/files/T8MaHiJ0C7Bguoia3J0p" alt=""><figcaption><p>Adding a child automatically uses the Default Child Container</p></figcaption></figure>

### Parent Details

When one instance is drag+dropped onto another instance, the Parent property is set according to the parent's Default Slot.

Using the example above, the RectangleInstance is dropped on the ContainerTestInstance. Since the ContainerTestInstance is of type Frame, then the Default Slot is applied on the drop, which results in the RectangleInstance's Parent being set to `ContainerTestInstance.InnerRectangle`.

<figure><img src="/files/73OnnfDRA2wbDvkVSBp2" alt=""><figcaption></figcaption></figure>

## Ignoring Default Slot

As mentioned above, if an instance is added to a parent component, the instance automatically attaches itself to the parent's `Default Slot`. This can be undone by manually changing the `Parent` property.

For example, the `Parent` can be manually changed to `ContainerTestInstance`.

<figure><img src="/files/4bbOZHKTNcUo295hBGQ6" alt=""><figcaption><p>Changing the Parent to the name of the instance can force a child to be attached to the root of the parent</p></figcaption></figure>


---

# 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://docs.flatredball.com/gum/gum-tool/gum-elements/component/default-child-container.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.
