Examples for list
Testing with MatListHarness
This example contains tests. Open in Stackblitz to run the tests.
Basic list
Item 1
Item 2
Item 3
List with sections
Folders
Photos
Jan 1, 2016
Recipes
Jan 17, 2016
Work
Jan 28, 2016
Notes
Vacation Itinerary
Feb 20, 2016
Kitchen Remodel
Jan 18, 2016
List with selection
Boots
Clogs
Loafers
Moccasins
Sneakers

Options selected: 0

List with single selection using Reactive forms
Boots
Clogs
Loafers
Moccasins
Sneakers

Option selected: None

List with single selection using Reactive Forms
Boots
Clogs
Loafers
Moccasins
Sneakers

Option selected: None

List variants

Single line lists

This is the title
Also the title

Two line lists

TitleSecond line
TitleSecond line
Title Second line

Three line lists

TitleSecond lineThird line
TitleSecond line. This line will truncate.Third line
TitleSecond line. This line will truncate. Third line

Three line list with secondary text wrapping

Title Secondary line that will wrap because the list lines is explicitly set to 3 lines. Text inside of a `matListItemTitle` or `matListItemLine` will never wrap.
Title Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est