Default Light
MgLibrary
Overview
Installation
Buttons
Cards
Charts
Codes
Data Grids
Dropdowns
Editors
Headers & Animations
Icons
Indicators
Inputs
Lists
Modals
Menus
Panels
Pills & Chips
Scheduling
Tabs
Time Line
Trees
Customization

Lists

Flexible list containers for displaying collections of items, supporting icons, badges, and custom templates.

Use this example to explore default behavior, customization points, and accessibility-friendly patterns in a real Blazor page.

Standard List

MgListContainer

A simple container for a list of items with support for selection events and styling.

Templated List

MgListTemplate

A powerful generic list component that allows you to define custom rendering for each item.

List Navigation

Location

Lists can also be used as navigation menus. Use the Location property on MgListItem to enable automatic navigation on click.

API Reference

MgListContainer

Property Type Default Description
ItemChanged EventCallback<MgListItem> - Triggered when a list item is clicked.

MgListTemplate

Property Type Default Description
Items IEnumerable<TItem> null The collection of items to render.
ItemTemplate RenderFragment<TItem> null Custom template for each item.
An unhandled error has occurred. Reload 🗙