
Component parameters are how parent components pass data down to child components. They are C# properties decorated with the [Parameter] attribute.
// GreetingCard.razor
<div class="card">
<h2>Hello, @Name!</h2>
<p>@Message</p>
</div>
@code {
[Parameter] public string Name { get; set; } = "";
[Parameter] public string Message { get; set; } = "";
}<GreetingCard Name="Alice" Message="Welcome back!" />For passing values deep through the component tree without threading them through every level:
<CascadingValue Value="currentUser">
@Body
</CascadingValue>
// In a deeply nested child:
[CascadingParameter] public AppUser CurrentUser { get; set; }[EditorRequired] for compile-time warningsReference:
TaskLoco™ — The Sticky Note GOAT