Slots pass markup into a component. x-slot allows you to define named slots.
You may define the content of the named slot using the x-slot tag. Any content not within a x-slot tag will be passed to the component in the $slot variable:
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi :)
Should be a trivial question. I noticed in the Blade Component Cookbook series, namely in the modal episode located here: https://laracasts.com/series/blade-component-cookbook/episodes/5, a component named <x-slot> was used.
Is this a built-in Blade component? I don't see to recall Jeff building a slot.blade.php anywhere. I also noted the usage of $trigger in the actual component definition file. Where is this coming from?
Thanks :)
Slots pass markup into a component. x-slot allows you to define named slots.
You may define the content of the named slot using the x-slot tag. Any content not within a x-slot tag will be passed to the component in the $slot variable:
Please or to participate in this conversation.