<!-- This file is auto-generated by the docs:generate-viewhelper-docs command. Do not edit directly -->

# ui:asChild

**Reference:** [View Source](https://github.com/jramke/fluid-primitives/tree/main/Classes/ViewHelpers/AsChildViewHelper.php)

Opts a component into the `asChild` prop and marks which of its tags is the asChild target.

Place this inline, inside the opening bracket of whichever tag should receive the merged attributes when a caller passes `asChild="{true}"` - the same way `{ui:ref(...)}` and `{ui:attributes()}` are already placed.

## Example
```html
<button
    {ui:ref(name: 'trigger')}
    {ui:attributes()}
    {ui:asChild()}>
    <f:slot />
</button>
```

## Arguments

_None_
