### MudBlazor Align Content Start Example
Source: https://mudblazor.com/utilities/align-content
Demonstrates the 'align-content-start' utility class in MudBlazor to align rows to the start of a flex container. This example uses MudPaper components to visualize the layout.
```html
```
--------------------------------
### MudSelect Placement Examples
Source: https://mudblazor.com/components/select
Demonstrates different placement options for the MudSelect component using AnchorOrigin and TransformOrigin properties. These examples show how to control the popover's starting point and transformation relative to the input field.
```html
FooBarFooBarFooBar
```
--------------------------------
### Install MudBlazor Templates
Source: https://mudblazor.com/getting-started/installation
Installs the MudBlazor dotnet templates, which are modified versions of the Microsoft Web App template including MudBlazor components for faster project setup.
```bash
dotnet new install MudBlazor.Templates
```
--------------------------------
### MudBlazor: Basic Align Items - Start
Source: https://mudblazor.com/utilities/align-items
Demonstrates the basic usage of the `align-start` utility class in MudBlazor to align flex items to the start of the cross axis. This example uses MudBlazor components within a flex container.
```html
```
--------------------------------
### MudBlazor Timeline Alignment Example
Source: https://mudblazor.com/components/timeline
Demonstrates how to set the starting direction for timeline dots using the `TimelineAlign` property on the `MudTimeline` component. This example shows different alignment options for timeline items.
```html
StartDefaultEndAug 2020MudBlazor EmergesA repository pops up on GitHub named MudBlazor.The development has already started and the most common components can be found already.Oct 2020MudBlazor Unleashed!The first version is released and uploaded as v1.0.7.Nov 2020First MinorMudBlazor gets its first minor with version 1.1.0.TimerPicker, AutoComplete and Charts join the library as well as T versions of our inputs and selects.
```
```csharp
@code{
private TimelineAlign _timelineAlign { get; set; } = TimelineAlign.Start;
}
```
--------------------------------
### Create New Project with MudBlazor Template
Source: https://mudblazor.com/getting-started/installation
Creates a new Blazor project with MudBlazor integrated, using specified interactivity mode, project name, and all interactive features. Use --help for more options.
```bash
dotnet new mudblazor --interactivity Auto --name MyApplication --all-interactive
dotnet new mudblazor --help
```
--------------------------------
### Install MudBlazor NuGet Package
Source: https://mudblazor.com/getting-started/installation
Adds the MudBlazor library to an existing .NET project via the NuGet Package Manager. This command-line instruction is an alternative to using the GUI.
```bash
dotnet add package MudBlazor
```
--------------------------------
### MudFileUpload: Single File Upload Example
Source: https://mudblazor.com/api/mudfileupload%601
Demonstrates how to use the MudFileUpload component to upload a single file using IBrowserFile. It includes basic setup and binding the uploaded file to a variable.
```csharp
@using MudBlazor
@using System.IO
@code {
private IBrowserFile uploadedFile;
private void OnFilesChanged(InputFileChangeEventArgs e)
{
uploadedFile = e.File;
// Process the uploaded file here
Console.WriteLine($"File uploaded: {uploadedFile.Name}, Size: {uploadedFile.Size}");
}
}
```
--------------------------------
### MudBlazor Dropdown Settings Example (HTML)
Source: https://mudblazor.com/components/popover
An HTML example showcasing the integration of DropdownSettings with MudBlazor components. This includes MudSelect, MudMenu, and MudAutocomplete, demonstrating how to bind various dropdown-related properties like AnchorOrigin, TransformOrigin, and RelativeWidth.
```html
FooBarLorem ipsum dolor sit amet, consectetur adipiscing elitTop LeftTop CenterTop RightBottom LeftBottom CenterBottom RightCenter LeftCenter CenterCenter RightTop LeftTop CenterTop RightBottom LeftBottom CenterBottom RightCenter LeftCenter CenterCenter Right
@foreach (var cursor in Cursors)
{
@cursor
}
```
```csharp
@code {
string[] Cursors = new[]
{
"cursor-all-scroll", "cursor-auto", "cursor-cell", "cursor-col-resize", "cursor-copy", "cursor-crosshair", "cursor-default", "cursor-grab", "cursor-grabbing", "cursor-help", "cursor-move", "cursor-no-drop", "cursor-none", "cursor-not-allowed", "cursor-n-resize", "cursor-pointer", "cursor-progress", "cursor-row-resize", "cursor-text", "cursor-url", "cursor-vertical-text", "cursor-wait", "cursor-w-resize", "cursor-zoom-in", "cursor-zoom-out"
};
}
```
--------------------------------
### MudBlazor DateRangePicker Configuration Examples
Source: https://mudblazor.com/components/datepicker
Demonstrates various configurations for the MudBlazor MudDateRangePicker component. Includes basic usage, editable ranges, placeholders, clearable functionality, custom date formats, custom start months, and interactive actions with buttons.
```html
ClearCancelOKAutoClose
```
```csharp
@code {
private MudDateRangePicker _picker;
private DateRange _dateRange = new DateRange(DateTime.Now.Date, DateTime.Now.AddDays(5).Date);
private bool _autoClose;
}
```
--------------------------------
### MudBlazor ToolBar Basic and Spaced Examples
Source: https://mudblazor.com/components/toolbar
Demonstrates the basic usage of MudBlazor's MudToolBar component with various icon buttons. It also shows how to use MudSpacer to push content to the right and how to justify content within the toolbar.
```html
```
--------------------------------
### MudTable Loading Content Example (C#)
Source: https://mudblazor.com/api/mudtable
Demonstrates how to customize the content displayed while the MudTable is loading data. This example uses `LoadingContentBody` to show a multi-row, multi-column placeholder structure.
```csharp
Loading Name...Loading Age...Loading Status...Please wait while data is being fetched.
@code {
public class MyObject { public string Name { get; set; } public int Age { get; set; } public string Status { get; set; } }
public IEnumerable MyItems { get; set; }
public bool Loading { get; set; } = true;
public async Task> LoadTableData(TableState state)
{
Loading = true;
await Task.Delay(2000); // Simulate network delay
var data = new List
{
new MyObject { Name = "Alice", Age = 30, Status = "Active" },
new MyObject { Name = "Bob", Age = 25, Status = "Inactive" },
new MyObject { Name = "Charlie", Age = 35, Status = "Active" }
};
Loading = false;
return new TableData { TotalItems = data.Count, Items = data };
}
}
```
--------------------------------
### Basic Flex Grow Example (HTML)
Source: https://mudblazor.com/utilities/flex-grow
Demonstrates the basic usage of `flex-grow-1` to allow a flex item to grow and fill available space within a flex container. This example uses MudBlazor components within an HTML structure.
```html