@props and @aware: Passing Data Down Your Blade Component Tree
@props is the first thing every Laravel developer learns about Blade components, and it's usually as far as most people go:
{{-- resources/views/components/alert.blade.php --}}
@props(['type' => 'info'])
<div class="alert alert-{{ $type }}">
{{ $slot }}
</div>
<x-alert type="danger">Something broke.</x-alert>
That covers a component reading its own attributes. The gap shows up once components nest — a <x-menu> with <x-menu.item> children, where the items need to know something the parent already knows (which item is active, what color scheme the menu is using) without every single child repeating that prop.
The naive fix, and why it's annoying
<x-menu color="dark">
<x-menu.item color="dark" :active="true">Dashboard</x-menu.item>
<x-menu.item color="dark">Settings</x-menu.item>
</x-menu>
Passing color="dark" to every single item works, but it's repetitive and it's easy to forget on one item when you add a fourth. The parent already has this data. The children shouldn't need it handed to them individually.
@aware: read what your parent already has
@aware lets a child component declare it wants to read a prop from its parent's own @props declaration, without that prop being passed down explicitly:
{{-- components/menu.blade.php --}}
@props(['color' => 'light'])
<div class="menu menu-{{ $color }}">
{{ $slot }}
</div>
{{-- components/menu/item.blade.php --}}
@props(['active' => false])
@aware(['color' => 'light'])
<div class="menu-item menu-item-{{ $color }} @if($active) menu-item-active @endif">
{{ $slot }}
</div>
<x-menu color="dark">
<x-menu.item :active="true">Dashboard</x-menu.item>
<x-menu.item>Settings</x-menu.item>
</x-menu>
Each <x-menu.item> now resolves $color from its parent <x-menu> automatically. The default in @aware(['color' => 'light']) only applies if the child is rendered completely outside a <x-menu> — a safety net, not the normal path.
The catch: @aware only sees explicit attributes
@aware reads attributes that were explicitly passed to the parent component in the Blade markup, not any value the parent computed internally and stored in a variable. If <x-menu> derives $color from something else internally rather than receiving it as a passed attribute, the child won't see it through @aware — you'd need to pass it explicitly or expose it differently, for example via a view composer or a shared parent method.
When to reach for it
@aware is worth using the moment you have a two-level-or-deeper component structure — menus with items, tabs with panels, forms with fields — where a setting genuinely belongs to the parent and children just need to stay in sync with it. For flat, single-level components, plain @props is all you need; don't reach for @aware until nesting actually creates the repetition problem it solves.