In Laravel Blade components, you can pass content as slots or as attributes.
For HTML content, it's clearer to pass it as slots because it indicates that the content is HTML and allows you to include HTML tags directly.
And, in the example below, if you pass the title as an attribute, it will also be used as the title of the div
container tag which might be unexpected.
Top comments (0)