Basic Usage
The default MudStack
displays its items vertically in a column.
Item 1
Item 2
Item 3
<MudStack> <MudPaper Class="pa-3">Item 1</MudPaper> <MudPaper Class="pa-3">Item 2</MudPaper> <MudPaper Class="pa-3">Item 3</MudPaper> </MudStack>
Direction
With the Row
property set to true the items will be displayed horizontally in a row.
Item 1
Item 2
Item 3
<MudStack Row="true"> <MudPaper Class="pa-3">Item 1</MudPaper> <MudPaper Class="pa-3">Item 2</MudPaper> <MudPaper Class="pa-3">Item 3</MudPaper> </MudStack>
Spacing
The default spacing can be changed by setting any number between 0 and 16 with the Spacing
property.
Item 1
Item 2
Item 3
<MudStack Spacing="@_spacing" Row="true"> <MudPaper Class="pa-3">Item 1</MudPaper> <MudPaper Class="pa-3">Item 2</MudPaper> <MudPaper Class="pa-3">Item 3</MudPaper> </MudStack> <MudSlider @bind-Value="_spacing" Min="0" Max="16">Spacing: @_spacing.ToString()</MudSlider>
@code { private int _spacing { get; set; } = 3; }