Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

burfi's avatar
Level 2

Properties not available in a child LW component

I have a LW modal component that inherits its properties from a parent modal component. I am somehow not able to use the properties as parameters.

If this sounds confusing... in the code below, it renders the value of {{ $name }} inside the div without issues but it does not render it as the value of x-ref in the x-ref="{{ $name }}" statement.

Why?

<div>
    <x-dialog-modal wire:model="showUserDialog" class="h-3/4">
        <x-slot name="title">
            {{ __('User') }}
        </x-slot>

        <x-slot name="content">
            <div>
                {{ $name }}
            </div>
			<div x-data="{}">
				<div x-ref="{{ $name }}">
				...
0 likes
15 replies

Please or to participate in this conversation.