---
title: "Slot ViewHelper <f:slot>"
manual: "Fluid ViewHelper Reference"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-slot@13.4"
source: "Global/Slot.rst"
modified: "2026-09-17T09:07:45+00:00"
---

# Slot ViewHelper `<f:slot>`

`f:slot` allows a template that is called as a component to access and render
the child content of the calling component tag. This makes nesting of components
possible.

Most importantly, the `f:slot` ViewHelper makes sure that the right level of
HTML escaping happens automatically, in line with the escaping in other parts of
Fluid: If HTML is used directly, it is not escaped. However, if a variable is
used within the child content that contains a HTML string, that HTML is escaped
because it might be from an unknown source.

In combination with the [\<f:fragment> ViewHelper](https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-fragment@13.4),
multiple slots can be used in one component.

If a slot is defined, this ViewHelper will always attempt to return a string,
regardless of the original type of the content. If a slot is not defined, the
ViewHelper will return `null`.

Go to the source code of this ViewHelper: [SlotViewHelper.php (GitHub)](https://github.com/TYPO3/Fluid/blob/main/src/ViewHelpers/SlotViewHelper.php).

## Arguments of the `<f:slot>` ViewHelper

-   **name**

    -   *Type:* string
    -   *Default:* 'default'

    Name of the slot, can be omitted for default slot
