|
| 1 | +<h3>Single line lists</h3> |
| 2 | +<mat-list> |
| 3 | + <mat-list-item> |
| 4 | + <span matListItemTitle>This is the title</span> |
| 5 | + </mat-list-item> |
| 6 | + <mat-list-item>Also the title</mat-list-item> |
| 7 | +</mat-list> |
| 8 | + |
| 9 | +<h3>Two line lists</h3> |
| 10 | +<mat-list> |
| 11 | + <mat-list-item> |
| 12 | + <span matListItemTitle>Title</span> |
| 13 | + <span matListItemLine>Second line</span> |
| 14 | + </mat-list-item> |
| 15 | + <mat-list-item> |
| 16 | + <span matListItemTitle>Title</span> |
| 17 | + <span>Second line</span> |
| 18 | + </mat-list-item> |
| 19 | + <mat-list-item> |
| 20 | + <span matListItemTitle>Title</span> |
| 21 | + Second line |
| 22 | + </mat-list-item> |
| 23 | +</mat-list> |
| 24 | + |
| 25 | +<h3>Three line lists</h3> |
| 26 | +<mat-list> |
| 27 | + <mat-list-item> |
| 28 | + <span matListItemTitle>Title</span> |
| 29 | + <span matListItemLine>Second line</span> |
| 30 | + <span matListItemLine>Third line</span> |
| 31 | + </mat-list-item> |
| 32 | + <mat-list-item> |
| 33 | + <span matListItemTitle>Title</span> |
| 34 | + <span matListItemLine>Second line. This line will truncate.</span> |
| 35 | + <span>Third line</span> |
| 36 | + </mat-list-item> |
| 37 | + <mat-list-item> |
| 38 | + <span matListItemTitle>Title</span> |
| 39 | + <span matListItemLine>Second line. This line will truncate.</span> |
| 40 | + Third line |
| 41 | + </mat-list-item> |
| 42 | +</mat-list> |
| 43 | + |
| 44 | +<h3>Three line list with secondary text wrapping</h3> |
| 45 | +<mat-list class="example-list-wrapping"> |
| 46 | + <mat-list-item lines="3"> |
| 47 | + <span matListItemTitle>Title</span> |
| 48 | + <span |
| 49 | + >Secondary line that will wrap because the list lines is explicitly set to 3 lines. Text |
| 50 | + inside of a `matListItemTitle` or `matListItemLine` will never wrap. |
| 51 | + </span> |
| 52 | + </mat-list-item> |
| 53 | + <mat-list-item lines="3"> |
| 54 | + <span matListItemTitle>Title</span> |
| 55 | + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut |
| 56 | + labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco |
| 57 | + laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in |
| 58 | + voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat |
| 59 | + non proident, sunt in culpa qui officia deserunt mollit anim id est |
| 60 | + </mat-list-item> |
| 61 | +</mat-list> |
0 commit comments