md-list spec card
Identity · when to use / when NOT · decision cues · behavioural contract · do/don't · anti-patterns · full API. Paste into your agent when you're implementing with this component.
A vertical set of related rows. md-list owns the list semantics,
selection mode, roving keyboard focus and optional drag-reordering; the rows
themselves are md-list-item children. Configuration
flows down from the list — you set it once on the wrapper, never on the
rows.
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list label="Mail" style="inline-size: 340px;">
<md-list-item type="button" headline="Inbox" supporting-text="12 new" leading-icon="inbox" trailing-supporting-text="24"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Starred" supporting-text="Marked important" leading-icon="star" trailing-supporting-text="3"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Drafts" supporting-text="Resume where you left off" leading-icon="drafts"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Sent" supporting-text="Outgoing mail" leading-icon="send"></md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdDivider, MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList label="Mail" style={{ inlineSize: '340px' }}>
<MdListItem type="button" headline="Inbox" supportingText="12 new" leadingIcon="inbox" trailingSupportingText="24"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Starred" supportingText="Marked important" leadingIcon="star" trailingSupportingText="3"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Drafts" supportingText="Resume where you left off" leadingIcon="drafts"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Sent" supportingText="Outgoing mail" leadingIcon="send"></MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list label="Mail" style="inline-size: 340px;">
<md-list-item type="button" headline="Inbox" supporting-text="12 new" leading-icon="inbox" trailing-supporting-text="24"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Starred" supporting-text="Marked important" leading-icon="star" trailing-supporting-text="3"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Drafts" supporting-text="Resume where you left off" leading-icon="drafts"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Sent" supporting-text="Outgoing mail" leading-icon="send"></md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list label="Mail" style="inline-size: 340px;">
<md-list-item type="button" headline="Inbox" supporting-text="12 new" leading-icon="inbox" trailing-supporting-text="24"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Starred" supporting-text="Marked important" leading-icon="star" trailing-supporting-text="3"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Drafts" supporting-text="Resume where you left off" leading-icon="drafts"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Sent" supporting-text="Outgoing mail" leading-icon="send"></md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list label="Mail" style="inline-size: 340px;">
<md-list-item type="button" headline="Inbox" supporting-text="12 new" leading-icon="inbox" trailing-supporting-text="24"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Starred" supporting-text="Marked important" leading-icon="star" trailing-supporting-text="3"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Drafts" supporting-text="Resume where you left off" leading-icon="drafts"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Sent" supporting-text="Outgoing mail" leading-icon="send"></md-list-item>
</md-list>
Already installed? See the
Installation guide for one-time package setup
(core + tokens, fonts). Each tab below shows two patterns for using
md-list in your project: Option A registers every AWC UI
component at once (simplest), Option B imports only this component for
tree-shake-friendly bundles.
<!-- ─── Option A: global registration (all components) ─── -->
<script type="module">
import '@awc-ui/core/define';
</script>
<!-- ─── Option B: single import (tree-shake only md-list) ─── -->
<script type="module">
import '@awc-ui/core/components/md-list';
</script>
<md-list></md-list>// ─── Option A: typed React wrapper (registers all components) ───
// Importing from '@awc-ui/react' calls defineCustomElements() as a
// side effect, so every md-* element becomes available in the browser.
import { MdList } from '@awc-ui/react';
export function Example() {
return <MdList></MdList>;
}
// ─── Option B: single import (tree-shake to only md-list) ───
// Skip the wrapper and use the raw custom element. Smallest bundle,
// but you lose typed props/events on JSX.
import '@awc-ui/core/components/md-list';
export function ExampleTreeShaken() {
return <md-list></md-list>;
}// ─── Option A: schema module (any md-* element accepted) ───
// Pair with `defineCustomElements(window)` in main.ts.
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@Component({
standalone: true,
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
template: `<md-list></md-list>`,
})
export class ExampleComponent {}
// ─── Option B: typed directive (tree-shake friendly) ───
// Pair with `import '@awc-ui/core/components/md-list'` in main.ts.
import { Component } from '@angular/core';
import { MdList } from '@awc-ui/angular';
@Component({
standalone: true,
imports: [MdList],
template: `<md-list></md-list>`,
})
export class ExampleTreeShakenComponent {}<!-- ─── Option A: typed Vue wrapper (registers all components) ─── -->
<script setup lang="ts">
import { MdList } from '@awc-ui/vue';
</script>
<template>
<MdList></MdList>
</template>
<!-- ─── Option B: single import (tree-shake to only md-list) ─── -->
<script setup lang="ts">
import '@awc-ui/core/components/md-list';
</script>
<template>
<md-list></md-list>
</template><!-- ─── Option A: global registration (done once in main entry) ─── -->
<!-- main.ts: -->
<!-- import { defineCustomElements } from '@awc-ui/svelte'; -->
<!-- defineCustomElements(window); -->
<md-list></md-list>
<!-- ─── Option B: single import (tree-shake to only md-list) ─── -->
<script lang="ts">
import '@awc-ui/core/components/md-list';
</script>
<md-list></md-list>| Situation | Use instead |
|---|---|
| Comparable data across columns | md-table |
| Rich, self-contained items with their own actions | A md-card collection |
| A contextual popup of actions | md-menu |
| Options in a picker | md-select / md-multi-select |
| Collapsible content sections | md-accordion |
| Navigation destinations | md-navigation-rail / md-navigation-bar |
| Moving items between two pools | md-transfer-list |
selectionMode, interactionMode and reorderable are written onto the
rows by the list. density gets there a different way — the list declares
--md-sys-density-scale on its own host and every row inherits it — but the
rule for you is the same: set it on the wrapper. Setting a written prop on an
individual md-list-item fights the parent and desynchronises the roving-focus
model. Keep md-list-item as a direct child too — wrapping rows in
<div>s for layout breaks child discovery.
Not one row below carries an interaction, reorder or density attribute — the drag handles, the separate focus stops for the trailing buttons and the tighter rung all come from the three attributes on the wrapper:
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list interaction-mode="multi-action" reorderable density="-1" label="Configured by the list" style="inline-size: 360px;">
<md-list-item type="button" headline="Ada Lovelace" supporting-text="Engineering" leading-icon="person">
<md-icon-button slot="trailing" icon="mail" aria-label="Email Ada Lovelace"></md-icon-button>
</md-list-item>
<md-list-item type="button" headline="Alan Turing" supporting-text="Research" leading-icon="person">
<md-icon-button slot="trailing" icon="mail" aria-label="Email Alan Turing"></md-icon-button>
</md-list-item>
<md-list-item type="button" headline="Grace Hopper" supporting-text="Compilers" leading-icon="person">
<md-icon-button slot="trailing" icon="mail" aria-label="Email Grace Hopper"></md-icon-button>
</md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdIconButton, MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList interactionMode="multi-action" reorderable density="-1" label="Configured by the list" style={{ inlineSize: '360px' }}>
<MdListItem type="button" headline="Ada Lovelace" supportingText="Engineering" leadingIcon="person">
<MdIconButton slot="trailing" icon="mail" aria-label="Email Ada Lovelace"></MdIconButton>
</MdListItem>
<MdListItem type="button" headline="Alan Turing" supportingText="Research" leadingIcon="person">
<MdIconButton slot="trailing" icon="mail" aria-label="Email Alan Turing"></MdIconButton>
</MdListItem>
<MdListItem type="button" headline="Grace Hopper" supportingText="Compilers" leadingIcon="person">
<MdIconButton slot="trailing" icon="mail" aria-label="Email Grace Hopper"></MdIconButton>
</MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list interaction-mode="multi-action" reorderable density="-1" label="Configured by the list" style="inline-size: 360px;">
<md-list-item type="button" headline="Ada Lovelace" supporting-text="Engineering" leading-icon="person">
<md-icon-button slot="trailing" icon="mail" aria-label="Email Ada Lovelace"></md-icon-button>
</md-list-item>
<md-list-item type="button" headline="Alan Turing" supporting-text="Research" leading-icon="person">
<md-icon-button slot="trailing" icon="mail" aria-label="Email Alan Turing"></md-icon-button>
</md-list-item>
<md-list-item type="button" headline="Grace Hopper" supporting-text="Compilers" leading-icon="person">
<md-icon-button slot="trailing" icon="mail" aria-label="Email Grace Hopper"></md-icon-button>
</md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list interaction-mode="multi-action" reorderable density="-1" label="Configured by the list" style="inline-size: 360px;">
<md-list-item type="button" headline="Ada Lovelace" supporting-text="Engineering" leading-icon="person">
<md-icon-button slot="trailing" icon="mail" aria-label="Email Ada Lovelace"></md-icon-button>
</md-list-item>
<md-list-item type="button" headline="Alan Turing" supporting-text="Research" leading-icon="person">
<md-icon-button slot="trailing" icon="mail" aria-label="Email Alan Turing"></md-icon-button>
</md-list-item>
<md-list-item type="button" headline="Grace Hopper" supporting-text="Compilers" leading-icon="person">
<md-icon-button slot="trailing" icon="mail" aria-label="Email Grace Hopper"></md-icon-button>
</md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list interaction-mode="multi-action" reorderable density="-1" label="Configured by the list" style="inline-size: 360px;">
<md-list-item type="button" headline="Ada Lovelace" supporting-text="Engineering" leading-icon="person">
<md-icon-button slot="trailing" icon="mail" aria-label="Email Ada Lovelace"></md-icon-button>
</md-list-item>
<md-list-item type="button" headline="Alan Turing" supporting-text="Research" leading-icon="person">
<md-icon-button slot="trailing" icon="mail" aria-label="Email Alan Turing"></md-icon-button>
</md-list-item>
<md-list-item type="button" headline="Grace Hopper" supporting-text="Compilers" leading-icon="person">
<md-icon-button slot="trailing" icon="mail" aria-label="Email Grace Hopper"></md-icon-button>
</md-list-item>
</md-list>| Style | Look | Use for |
|---|---|---|
standard | Default. One shared rounded chassis, no gaps — interleave dividers for separators | Dense, continuous lists |
segmented | Separate rounded tiles with a small gap; each row reads as its own affordance | Grouped settings, pickers |
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list list-style="standard" label="Account settings" style="inline-size: 260px;">
<md-list-item type="button" headline="Profile" leading-icon="person"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Privacy" leading-icon="lock"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Sign out" leading-icon="logout"></md-list-item>
</md-list>
<md-list list-style="segmented" label="Library" style="inline-size: 260px;">
<md-list-item type="button" headline="Photos" leading-icon="photo" trailing-supporting-text="128"></md-list-item>
<md-list-item type="button" headline="Videos" leading-icon="videocam" trailing-supporting-text="42"></md-list-item>
<md-list-item type="button" headline="Music" leading-icon="music_note" trailing-supporting-text="256"></md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdDivider, MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList listStyle="standard" label="Account settings" style={{ inlineSize: '260px' }}>
<MdListItem type="button" headline="Profile" leadingIcon="person"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Privacy" leadingIcon="lock"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Sign out" leadingIcon="logout"></MdListItem>
</MdList>
<MdList listStyle="segmented" label="Library" style={{ inlineSize: '260px' }}>
<MdListItem type="button" headline="Photos" leadingIcon="photo" trailingSupportingText="128"></MdListItem>
<MdListItem type="button" headline="Videos" leadingIcon="videocam" trailingSupportingText="42"></MdListItem>
<MdListItem type="button" headline="Music" leadingIcon="music_note" trailingSupportingText="256"></MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list list-style="standard" label="Account settings" style="inline-size: 260px;">
<md-list-item type="button" headline="Profile" leading-icon="person"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Privacy" leading-icon="lock"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Sign out" leading-icon="logout"></md-list-item>
</md-list>
<md-list list-style="segmented" label="Library" style="inline-size: 260px;">
<md-list-item type="button" headline="Photos" leading-icon="photo" trailing-supporting-text="128"></md-list-item>
<md-list-item type="button" headline="Videos" leading-icon="videocam" trailing-supporting-text="42"></md-list-item>
<md-list-item type="button" headline="Music" leading-icon="music_note" trailing-supporting-text="256"></md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list list-style="standard" label="Account settings" style="inline-size: 260px;">
<md-list-item type="button" headline="Profile" leading-icon="person"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Privacy" leading-icon="lock"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Sign out" leading-icon="logout"></md-list-item>
</md-list>
<md-list list-style="segmented" label="Library" style="inline-size: 260px;">
<md-list-item type="button" headline="Photos" leading-icon="photo" trailing-supporting-text="128"></md-list-item>
<md-list-item type="button" headline="Videos" leading-icon="videocam" trailing-supporting-text="42"></md-list-item>
<md-list-item type="button" headline="Music" leading-icon="music_note" trailing-supporting-text="256"></md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list list-style="standard" label="Account settings" style="inline-size: 260px;">
<md-list-item type="button" headline="Profile" leading-icon="person"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Privacy" leading-icon="lock"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Sign out" leading-icon="logout"></md-list-item>
</md-list>
<md-list list-style="segmented" label="Library" style="inline-size: 260px;">
<md-list-item type="button" headline="Photos" leading-icon="photo" trailing-supporting-text="128"></md-list-item>
<md-list-item type="button" headline="Videos" leading-icon="videocam" trailing-supporting-text="42"></md-list-item>
<md-list-item type="button" headline="Music" leading-icon="music_note" trailing-supporting-text="256"></md-list-item>
</md-list>There is no dividers prop. A separator is an md-divider element you
interleave between rows yourself — inset-start is the usual choice, because it
starts the rule past the leading-icon column:
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="With dividers" style="inline-size: 260px;">
<md-list-item headline="Inbox" leading-icon="inbox"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item headline="Starred" leading-icon="star"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item headline="Archive" leading-icon="archive"></md-list-item>
</md-list>
<md-list label="Without dividers" style="inline-size: 260px;">
<md-list-item headline="Inbox" leading-icon="inbox"></md-list-item>
<md-list-item headline="Starred" leading-icon="star"></md-list-item>
<md-list-item headline="Archive" leading-icon="archive"></md-list-item>
</md-list>
</div>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdDivider, MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<div style={{ display: 'flex', gap: '24px', flexWrap: 'wrap' }}>
<MdList label="With dividers" style={{ inlineSize: '260px' }}>
<MdListItem headline="Inbox" leadingIcon="inbox"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem headline="Starred" leadingIcon="star"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem headline="Archive" leadingIcon="archive"></MdListItem>
</MdList>
<MdList label="Without dividers" style={{ inlineSize: '260px' }}>
<MdListItem headline="Inbox" leadingIcon="inbox"></MdListItem>
<MdListItem headline="Starred" leadingIcon="star"></MdListItem>
<MdListItem headline="Archive" leadingIcon="archive"></MdListItem>
</MdList>
</div>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="With dividers" style="inline-size: 260px;">
<md-list-item headline="Inbox" leading-icon="inbox"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item headline="Starred" leading-icon="star"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item headline="Archive" leading-icon="archive"></md-list-item>
</md-list>
<md-list label="Without dividers" style="inline-size: 260px;">
<md-list-item headline="Inbox" leading-icon="inbox"></md-list-item>
<md-list-item headline="Starred" leading-icon="star"></md-list-item>
<md-list-item headline="Archive" leading-icon="archive"></md-list-item>
</md-list>
</div><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="With dividers" style="inline-size: 260px;">
<md-list-item headline="Inbox" leading-icon="inbox"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item headline="Starred" leading-icon="star"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item headline="Archive" leading-icon="archive"></md-list-item>
</md-list>
<md-list label="Without dividers" style="inline-size: 260px;">
<md-list-item headline="Inbox" leading-icon="inbox"></md-list-item>
<md-list-item headline="Starred" leading-icon="star"></md-list-item>
<md-list-item headline="Archive" leading-icon="archive"></md-list-item>
</md-list>
</div>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="With dividers" style="inline-size: 260px;">
<md-list-item headline="Inbox" leading-icon="inbox"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item headline="Starred" leading-icon="star"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item headline="Archive" leading-icon="archive"></md-list-item>
</md-list>
<md-list label="Without dividers" style="inline-size: 260px;">
<md-list-item headline="Inbox" leading-icon="inbox"></md-list-item>
<md-list-item headline="Starred" leading-icon="star"></md-list-item>
<md-list-item headline="Archive" leading-icon="archive"></md-list-item>
</md-list>
</div>A row promotes itself to two or three lines automatically when you add an
overline, supporting-text, or both. You don’t set a lines value by hand
for the common cases.
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list label="Row anatomy" style="inline-size: 380px;">
<md-list-item type="button" headline="One line"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Two lines" supporting-text="Supporting text promotes the row" leading-icon="inbox"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Overline also promotes" overline="OVERLINE" leading-icon="label"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Full configuration" supporting-text="Headline, supporting text and trailing meta" leading-icon="star" trailing-supporting-text="5 min ago"></md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdDivider, MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList label="Row anatomy" style={{ inlineSize: '380px' }}>
<MdListItem type="button" headline="One line"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Two lines" supportingText="Supporting text promotes the row" leadingIcon="inbox"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Overline also promotes" overline="OVERLINE" leadingIcon="label"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Full configuration" supportingText="Headline, supporting text and trailing meta" leadingIcon="star" trailingSupportingText="5 min ago"></MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list label="Row anatomy" style="inline-size: 380px;">
<md-list-item type="button" headline="One line"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Two lines" supporting-text="Supporting text promotes the row" leading-icon="inbox"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Overline also promotes" overline="OVERLINE" leading-icon="label"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Full configuration" supporting-text="Headline, supporting text and trailing meta" leading-icon="star" trailing-supporting-text="5 min ago"></md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list label="Row anatomy" style="inline-size: 380px;">
<md-list-item type="button" headline="One line"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Two lines" supporting-text="Supporting text promotes the row" leading-icon="inbox"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Overline also promotes" overline="OVERLINE" leading-icon="label"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Full configuration" supporting-text="Headline, supporting text and trailing meta" leading-icon="star" trailing-supporting-text="5 min ago"></md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list label="Row anatomy" style="inline-size: 380px;">
<md-list-item type="button" headline="One line"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Two lines" supporting-text="Supporting text promotes the row" leading-icon="inbox"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Overline also promotes" overline="OVERLINE" leading-icon="label"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Full configuration" supporting-text="Headline, supporting text and trailing meta" leading-icon="star" trailing-supporting-text="5 min ago"></md-list-item>
</md-list>A one-line row is the floor — headline only, no second region:
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list label="One line" style="max-inline-size: 340px;">
<md-list-item headline="Wi-Fi" trailing-icon="chevron_right"></md-list-item>
<md-list-item headline="Bluetooth" trailing-icon="chevron_right"></md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList label="One line" style={{ maxInlineSize: '340px' }}>
<MdListItem headline="Wi-Fi" trailingIcon="chevron_right"></MdListItem>
<MdListItem headline="Bluetooth" trailingIcon="chevron_right"></MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list label="One line" style="max-inline-size: 340px;">
<md-list-item headline="Wi-Fi" trailing-icon="chevron_right"></md-list-item>
<md-list-item headline="Bluetooth" trailing-icon="chevron_right"></md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list label="One line" style="max-inline-size: 340px;">
<md-list-item headline="Wi-Fi" trailing-icon="chevron_right"></md-list-item>
<md-list-item headline="Bluetooth" trailing-icon="chevron_right"></md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list label="One line" style="max-inline-size: 340px;">
<md-list-item headline="Wi-Fi" trailing-icon="chevron_right"></md-list-item>
<md-list-item headline="Bluetooth" trailing-icon="chevron_right"></md-list-item>
</md-list>And an overline on top of headline + supporting-text promotes the row all
the way to three lines:
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list label="Three line" style="max-inline-size: 400px;">
<md-list-item lines="3" overline="Today" headline="Deployment finished" supporting-text="All 14 services are healthy and traffic has been shifted to the new revision." leading-icon="rocket_launch"></md-list-item>
<md-list-item lines="3" overline="Yesterday" headline="Nightly backup" supporting-text="Snapshot completed in 42 seconds and was copied to the secondary region." leading-icon="backup"></md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList label="Three line" style={{ maxInlineSize: '400px' }}>
<MdListItem lines="3" overline="Today" headline="Deployment finished" supportingText="All 14 services are healthy and traffic has been shifted to the new revision." leadingIcon="rocket_launch"></MdListItem>
<MdListItem lines="3" overline="Yesterday" headline="Nightly backup" supportingText="Snapshot completed in 42 seconds and was copied to the secondary region." leadingIcon="backup"></MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list label="Three line" style="max-inline-size: 400px;">
<md-list-item lines="3" overline="Today" headline="Deployment finished" supporting-text="All 14 services are healthy and traffic has been shifted to the new revision." leading-icon="rocket_launch"></md-list-item>
<md-list-item lines="3" overline="Yesterday" headline="Nightly backup" supporting-text="Snapshot completed in 42 seconds and was copied to the secondary region." leading-icon="backup"></md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list label="Three line" style="max-inline-size: 400px;">
<md-list-item lines="3" overline="Today" headline="Deployment finished" supporting-text="All 14 services are healthy and traffic has been shifted to the new revision." leading-icon="rocket_launch"></md-list-item>
<md-list-item lines="3" overline="Yesterday" headline="Nightly backup" supporting-text="Snapshot completed in 42 seconds and was copied to the secondary region." leading-icon="backup"></md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list label="Three line" style="max-inline-size: 400px;">
<md-list-item lines="3" overline="Today" headline="Deployment finished" supporting-text="All 14 services are healthy and traffic has been shifted to the new revision." leading-icon="rocket_launch"></md-list-item>
<md-list-item lines="3" overline="Yesterday" headline="Nightly backup" supporting-text="Snapshot completed in 42 seconds and was copied to the secondary region." leading-icon="backup"></md-list-item>
</md-list>type decides whether a row is inert, a button, or a link.
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list label="Row types" style="inline-size: 400px;">
<md-list-item type="text" headline="Static text row" supporting-text="Not focusable — no ripple, no click event" leading-icon="text_fields"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Button row" supporting-text="Focusable, ripples on press, emits mdClick" leading-icon="touch_app" trailing-icon="chevron_right"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="link" href="https://m3.material.io/components/lists/guidelines" target="_blank" headline="Link row" supporting-text="Navigates to href in target" leading-icon="open_in_new" trailing-icon="north_east"></md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdDivider, MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList label="Row types" style={{ inlineSize: '400px' }}>
<MdListItem type="text" headline="Static text row" supportingText="Not focusable — no ripple, no click event" leadingIcon="text_fields"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Button row" supportingText="Focusable, ripples on press, emits mdClick" leadingIcon="touch_app" trailingIcon="chevron_right"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="link" href="https://m3.material.io/components/lists/guidelines" target="_blank" headline="Link row" supportingText="Navigates to href in target" leadingIcon="open_in_new" trailingIcon="north_east"></MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list label="Row types" style="inline-size: 400px;">
<md-list-item type="text" headline="Static text row" supporting-text="Not focusable — no ripple, no click event" leading-icon="text_fields"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Button row" supporting-text="Focusable, ripples on press, emits mdClick" leading-icon="touch_app" trailing-icon="chevron_right"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="link" href="https://m3.material.io/components/lists/guidelines" target="_blank" headline="Link row" supporting-text="Navigates to href in target" leading-icon="open_in_new" trailing-icon="north_east"></md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list label="Row types" style="inline-size: 400px;">
<md-list-item type="text" headline="Static text row" supporting-text="Not focusable — no ripple, no click event" leading-icon="text_fields"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Button row" supporting-text="Focusable, ripples on press, emits mdClick" leading-icon="touch_app" trailing-icon="chevron_right"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="link" href="https://m3.material.io/components/lists/guidelines" target="_blank" headline="Link row" supporting-text="Navigates to href in target" leading-icon="open_in_new" trailing-icon="north_east"></md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list label="Row types" style="inline-size: 400px;">
<md-list-item type="text" headline="Static text row" supporting-text="Not focusable — no ripple, no click event" leading-icon="text_fields"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Button row" supporting-text="Focusable, ripples on press, emits mdClick" leading-icon="touch_app" trailing-icon="chevron_right"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="link" href="https://m3.material.io/components/lists/guidelines" target="_blank" headline="Link row" supporting-text="Navigates to href in target" leading-icon="open_in_new" trailing-icon="north_east"></md-list-item>
</md-list>M3 puts supporting visuals at the leading edge, because that is what makes a list scannable. An icon, a 40px avatar and a square thumbnail are all first-class props.
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list label="Leading content" style="inline-size: 380px;">
<md-list-item type="button" headline="Leading icon" supporting-text="24px Material Symbol" leading-icon="wifi" trailing-icon="chevron_right"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Jane Cooper" supporting-text="Hey, are you free tonight?" leading-avatar="https://i.pravatar.cc/80?img=1" leading-avatar-alt="Jane Cooper" trailing-supporting-text="5m"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Leading image" supporting-text="Square thumbnail" leading-image="https://picsum.photos/seed/mdlist/112/112" leading-image-alt=""></md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdDivider, MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList label="Leading content" style={{ inlineSize: '380px' }}>
<MdListItem type="button" headline="Leading icon" supportingText="24px Material Symbol" leadingIcon="wifi" trailingIcon="chevron_right"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Jane Cooper" supportingText="Hey, are you free tonight?" leadingAvatar="https://i.pravatar.cc/80?img=1" leadingAvatarAlt="Jane Cooper" trailingSupportingText="5m"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Leading image" supportingText="Square thumbnail" leadingImage="https://picsum.photos/seed/mdlist/112/112" leadingImageAlt=""></MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list label="Leading content" style="inline-size: 380px;">
<md-list-item type="button" headline="Leading icon" supporting-text="24px Material Symbol" leading-icon="wifi" trailing-icon="chevron_right"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Jane Cooper" supporting-text="Hey, are you free tonight?" leading-avatar="https://i.pravatar.cc/80?img=1" leading-avatar-alt="Jane Cooper" trailing-supporting-text="5m"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Leading image" supporting-text="Square thumbnail" leading-image="https://picsum.photos/seed/mdlist/112/112" leading-image-alt=""></md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list label="Leading content" style="inline-size: 380px;">
<md-list-item type="button" headline="Leading icon" supporting-text="24px Material Symbol" leading-icon="wifi" trailing-icon="chevron_right"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Jane Cooper" supporting-text="Hey, are you free tonight?" leading-avatar="https://i.pravatar.cc/80?img=1" leading-avatar-alt="Jane Cooper" trailing-supporting-text="5m"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Leading image" supporting-text="Square thumbnail" leading-image="https://picsum.photos/seed/mdlist/112/112" leading-image-alt=""></md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list label="Leading content" style="inline-size: 380px;">
<md-list-item type="button" headline="Leading icon" supporting-text="24px Material Symbol" leading-icon="wifi" trailing-icon="chevron_right"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Jane Cooper" supporting-text="Hey, are you free tonight?" leading-avatar="https://i.pravatar.cc/80?img=1" leading-avatar-alt="Jane Cooper" trailing-supporting-text="5m"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Leading image" supporting-text="Square thumbnail" leading-image="https://picsum.photos/seed/mdlist/112/112" leading-image-alt=""></md-list-item>
</md-list>leading-avatar takes an image URL; leading-avatar-name takes a name and
renders the initials instead, which is the fallback to reach for when a contact
has no photo:
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="Avatars" style="inline-size: 300px;">
<md-list-item lines="2" headline="Ada Lovelace" supporting-text="Engineering" leading-avatar-name="Ada Lovelace"></md-list-item>
<md-list-item lines="2" headline="Alan Turing" supporting-text="Research" leading-avatar-name="Alan Turing"></md-list-item>
</md-list>
<md-list label="Thumbnails" style="inline-size: 300px;">
<md-list-item lines="2" headline="Coastline" supporting-text="4.2 MB" leading-image="https://picsum.photos/seed/a/80/80" leading-image-alt=""></md-list-item>
<md-list-item lines="2" headline="Forest" supporting-text="3.1 MB" leading-image="https://picsum.photos/seed/b/80/80" leading-image-alt=""></md-list-item>
</md-list>
</div>import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<div style={{ display: 'flex', gap: '24px', flexWrap: 'wrap' }}>
<MdList label="Avatars" style={{ inlineSize: '300px' }}>
<MdListItem lines="2" headline="Ada Lovelace" supportingText="Engineering" leadingAvatarName="Ada Lovelace"></MdListItem>
<MdListItem lines="2" headline="Alan Turing" supportingText="Research" leadingAvatarName="Alan Turing"></MdListItem>
</MdList>
<MdList label="Thumbnails" style={{ inlineSize: '300px' }}>
<MdListItem lines="2" headline="Coastline" supportingText="4.2 MB" leadingImage="https://picsum.photos/seed/a/80/80" leadingImageAlt=""></MdListItem>
<MdListItem lines="2" headline="Forest" supportingText="3.1 MB" leadingImage="https://picsum.photos/seed/b/80/80" leadingImageAlt=""></MdListItem>
</MdList>
</div>
</>
);
}// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="Avatars" style="inline-size: 300px;">
<md-list-item lines="2" headline="Ada Lovelace" supporting-text="Engineering" leading-avatar-name="Ada Lovelace"></md-list-item>
<md-list-item lines="2" headline="Alan Turing" supporting-text="Research" leading-avatar-name="Alan Turing"></md-list-item>
</md-list>
<md-list label="Thumbnails" style="inline-size: 300px;">
<md-list-item lines="2" headline="Coastline" supporting-text="4.2 MB" leading-image="https://picsum.photos/seed/a/80/80" leading-image-alt=""></md-list-item>
<md-list-item lines="2" headline="Forest" supporting-text="3.1 MB" leading-image="https://picsum.photos/seed/b/80/80" leading-image-alt=""></md-list-item>
</md-list>
</div><script setup>
import '@awc-ui/core/define';
</script>
<template>
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="Avatars" style="inline-size: 300px;">
<md-list-item lines="2" headline="Ada Lovelace" supporting-text="Engineering" leading-avatar-name="Ada Lovelace"></md-list-item>
<md-list-item lines="2" headline="Alan Turing" supporting-text="Research" leading-avatar-name="Alan Turing"></md-list-item>
</md-list>
<md-list label="Thumbnails" style="inline-size: 300px;">
<md-list-item lines="2" headline="Coastline" supporting-text="4.2 MB" leading-image="https://picsum.photos/seed/a/80/80" leading-image-alt=""></md-list-item>
<md-list-item lines="2" headline="Forest" supporting-text="3.1 MB" leading-image="https://picsum.photos/seed/b/80/80" leading-image-alt=""></md-list-item>
</md-list>
</div>
</template><script>
import '@awc-ui/core/define';
</script>
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="Avatars" style="inline-size: 300px;">
<md-list-item lines="2" headline="Ada Lovelace" supporting-text="Engineering" leading-avatar-name="Ada Lovelace"></md-list-item>
<md-list-item lines="2" headline="Alan Turing" supporting-text="Research" leading-avatar-name="Alan Turing"></md-list-item>
</md-list>
<md-list label="Thumbnails" style="inline-size: 300px;">
<md-list-item lines="2" headline="Coastline" supporting-text="4.2 MB" leading-image="https://picsum.photos/seed/a/80/80" leading-image-alt=""></md-list-item>
<md-list-item lines="2" headline="Forest" supporting-text="3.1 MB" leading-image="https://picsum.photos/seed/b/80/80" leading-image-alt=""></md-list-item>
</md-list>
</div>This is the distinction the API turns on:
| Event | Means |
|---|---|
mdActivate | The active row changed — the roving focus target moved, by click or by arrow key |
mdSelect | The selected set changed |
A list can do one, both, or neither. selection-mode="none" (the default) is
an activatable list: rows open things and nothing stays ticked.
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list selection-mode="single-select" label="Plan" style="inline-size: 260px;">
<md-list-item type="button" headline="Free" leading-icon="check_circle"></md-list-item>
<md-list-item type="button" headline="Pro" leading-icon="check_circle" selected></md-list-item>
<md-list-item type="button" headline="Team" leading-icon="check_circle"></md-list-item>
<md-list-item type="button" headline="Enterprise" leading-icon="check_circle"></md-list-item>
</md-list>
<md-list selection-mode="multi-select" label="Notification channels" style="inline-size: 260px;">
<md-list-item type="button" headline="Email" selected></md-list-item>
<md-list-item type="button" headline="SMS"></md-list-item>
<md-list-item type="button" headline="Push" selected></md-list-item>
<md-list-item type="button" headline="In-app banner"></md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList selectionMode="single-select" label="Plan" style={{ inlineSize: '260px' }}>
<MdListItem type="button" headline="Free" leadingIcon="check_circle"></MdListItem>
<MdListItem type="button" headline="Pro" leadingIcon="check_circle" selected></MdListItem>
<MdListItem type="button" headline="Team" leadingIcon="check_circle"></MdListItem>
<MdListItem type="button" headline="Enterprise" leadingIcon="check_circle"></MdListItem>
</MdList>
<MdList selectionMode="multi-select" label="Notification channels" style={{ inlineSize: '260px' }}>
<MdListItem type="button" headline="Email" selected></MdListItem>
<MdListItem type="button" headline="SMS"></MdListItem>
<MdListItem type="button" headline="Push" selected></MdListItem>
<MdListItem type="button" headline="In-app banner"></MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list selection-mode="single-select" label="Plan" style="inline-size: 260px;">
<md-list-item type="button" headline="Free" leading-icon="check_circle"></md-list-item>
<md-list-item type="button" headline="Pro" leading-icon="check_circle" selected></md-list-item>
<md-list-item type="button" headline="Team" leading-icon="check_circle"></md-list-item>
<md-list-item type="button" headline="Enterprise" leading-icon="check_circle"></md-list-item>
</md-list>
<md-list selection-mode="multi-select" label="Notification channels" style="inline-size: 260px;">
<md-list-item type="button" headline="Email" selected></md-list-item>
<md-list-item type="button" headline="SMS"></md-list-item>
<md-list-item type="button" headline="Push" selected></md-list-item>
<md-list-item type="button" headline="In-app banner"></md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list selection-mode="single-select" label="Plan" style="inline-size: 260px;">
<md-list-item type="button" headline="Free" leading-icon="check_circle"></md-list-item>
<md-list-item type="button" headline="Pro" leading-icon="check_circle" selected></md-list-item>
<md-list-item type="button" headline="Team" leading-icon="check_circle"></md-list-item>
<md-list-item type="button" headline="Enterprise" leading-icon="check_circle"></md-list-item>
</md-list>
<md-list selection-mode="multi-select" label="Notification channels" style="inline-size: 260px;">
<md-list-item type="button" headline="Email" selected></md-list-item>
<md-list-item type="button" headline="SMS"></md-list-item>
<md-list-item type="button" headline="Push" selected></md-list-item>
<md-list-item type="button" headline="In-app banner"></md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list selection-mode="single-select" label="Plan" style="inline-size: 260px;">
<md-list-item type="button" headline="Free" leading-icon="check_circle"></md-list-item>
<md-list-item type="button" headline="Pro" leading-icon="check_circle" selected></md-list-item>
<md-list-item type="button" headline="Team" leading-icon="check_circle"></md-list-item>
<md-list-item type="button" headline="Enterprise" leading-icon="check_circle"></md-list-item>
</md-list>
<md-list selection-mode="multi-select" label="Notification channels" style="inline-size: 260px;">
<md-list-item type="button" headline="Email" selected></md-list-item>
<md-list-item type="button" headline="SMS"></md-list-item>
<md-list-item type="button" headline="Push" selected></md-list-item>
<md-list-item type="button" headline="In-app banner"></md-list-item>
</md-list><!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="Multi-select" selection-mode="multi-select" style="inline-size: 280px;">
<md-list-item headline="Photos" selected></md-list-item>
<md-list-item headline="Videos" selected></md-list-item>
<md-list-item headline="Documents"></md-list-item>
</md-list>
<md-list label="Segmented selection" list-style="segmented" selection-mode="single-select" style="inline-size: 280px;">
<md-list-item headline="Light" selected></md-list-item>
<md-list-item headline="Dark"></md-list-item>
<md-list-item headline="System"></md-list-item>
</md-list>
</div>import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<div style={{ display: 'flex', gap: '24px', flexWrap: 'wrap' }}>
<MdList label="Multi-select" selectionMode="multi-select" style={{ inlineSize: '280px' }}>
<MdListItem headline="Photos" selected></MdListItem>
<MdListItem headline="Videos" selected></MdListItem>
<MdListItem headline="Documents"></MdListItem>
</MdList>
<MdList label="Segmented selection" listStyle="segmented" selectionMode="single-select" style={{ inlineSize: '280px' }}>
<MdListItem headline="Light" selected></MdListItem>
<MdListItem headline="Dark"></MdListItem>
<MdListItem headline="System"></MdListItem>
</MdList>
</div>
</>
);
}// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="Multi-select" selection-mode="multi-select" style="inline-size: 280px;">
<md-list-item headline="Photos" selected></md-list-item>
<md-list-item headline="Videos" selected></md-list-item>
<md-list-item headline="Documents"></md-list-item>
</md-list>
<md-list label="Segmented selection" list-style="segmented" selection-mode="single-select" style="inline-size: 280px;">
<md-list-item headline="Light" selected></md-list-item>
<md-list-item headline="Dark"></md-list-item>
<md-list-item headline="System"></md-list-item>
</md-list>
</div><script setup>
import '@awc-ui/core/define';
</script>
<template>
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="Multi-select" selection-mode="multi-select" style="inline-size: 280px;">
<md-list-item headline="Photos" selected></md-list-item>
<md-list-item headline="Videos" selected></md-list-item>
<md-list-item headline="Documents"></md-list-item>
</md-list>
<md-list label="Segmented selection" list-style="segmented" selection-mode="single-select" style="inline-size: 280px;">
<md-list-item headline="Light" selected></md-list-item>
<md-list-item headline="Dark"></md-list-item>
<md-list-item headline="System"></md-list-item>
</md-list>
</div>
</template><script>
import '@awc-ui/core/define';
</script>
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="Multi-select" selection-mode="multi-select" style="inline-size: 280px;">
<md-list-item headline="Photos" selected></md-list-item>
<md-list-item headline="Videos" selected></md-list-item>
<md-list-item headline="Documents"></md-list-item>
</md-list>
<md-list label="Segmented selection" list-style="segmented" selection-mode="single-select" style="inline-size: 280px;">
<md-list-item headline="Light" selected></md-list-item>
<md-list-item headline="Dark"></md-list-item>
<md-list-item headline="System"></md-list-item>
</md-list>
</div><!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list label="Pick artwork" selection-mode="multi-select" style="max-inline-size: 340px;">
<md-list-item lines="2" headline="Coastline" supporting-text="1600 × 900" leading-image="https://picsum.photos/seed/c/80/80" leading-image-alt="" selected></md-list-item>
<md-list-item lines="2" headline="Forest" supporting-text="1600 × 900" leading-image="https://picsum.photos/seed/d/80/80" leading-image-alt=""></md-list-item>
<md-list-item lines="2" headline="Desert" supporting-text="1600 × 900" leading-image="https://picsum.photos/seed/e/80/80" leading-image-alt=""></md-list-item>
</md-list>import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList label="Pick artwork" selectionMode="multi-select" style={{ maxInlineSize: '340px' }}>
<MdListItem lines="2" headline="Coastline" supportingText="1600 × 900" leadingImage="https://picsum.photos/seed/c/80/80" leadingImageAlt="" selected></MdListItem>
<MdListItem lines="2" headline="Forest" supportingText="1600 × 900" leadingImage="https://picsum.photos/seed/d/80/80" leadingImageAlt=""></MdListItem>
<MdListItem lines="2" headline="Desert" supportingText="1600 × 900" leadingImage="https://picsum.photos/seed/e/80/80" leadingImageAlt=""></MdListItem>
</MdList>
</>
);
}// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list label="Pick artwork" selection-mode="multi-select" style="max-inline-size: 340px;">
<md-list-item lines="2" headline="Coastline" supporting-text="1600 × 900" leading-image="https://picsum.photos/seed/c/80/80" leading-image-alt="" selected></md-list-item>
<md-list-item lines="2" headline="Forest" supporting-text="1600 × 900" leading-image="https://picsum.photos/seed/d/80/80" leading-image-alt=""></md-list-item>
<md-list-item lines="2" headline="Desert" supporting-text="1600 × 900" leading-image="https://picsum.photos/seed/e/80/80" leading-image-alt=""></md-list-item>
</md-list><script setup>
import '@awc-ui/core/define';
</script>
<template>
<md-list label="Pick artwork" selection-mode="multi-select" style="max-inline-size: 340px;">
<md-list-item lines="2" headline="Coastline" supporting-text="1600 × 900" leading-image="https://picsum.photos/seed/c/80/80" leading-image-alt="" selected></md-list-item>
<md-list-item lines="2" headline="Forest" supporting-text="1600 × 900" leading-image="https://picsum.photos/seed/d/80/80" leading-image-alt=""></md-list-item>
<md-list-item lines="2" headline="Desert" supporting-text="1600 × 900" leading-image="https://picsum.photos/seed/e/80/80" leading-image-alt=""></md-list-item>
</md-list>
</template><script>
import '@awc-ui/core/define';
</script>
<md-list label="Pick artwork" selection-mode="multi-select" style="max-inline-size: 340px;">
<md-list-item lines="2" headline="Coastline" supporting-text="1600 × 900" leading-image="https://picsum.photos/seed/c/80/80" leading-image-alt="" selected></md-list-item>
<md-list-item lines="2" headline="Forest" supporting-text="1600 × 900" leading-image="https://picsum.photos/seed/d/80/80" leading-image-alt=""></md-list-item>
<md-list-item lines="2" headline="Desert" supporting-text="1600 × 900" leading-image="https://picsum.photos/seed/e/80/80" leading-image-alt=""></md-list-item>
</md-list>single-select moves the selection; multi-select sets
aria-multiselectable on the list and toggles rows independently. Read the
result with getSelectedIndices().
interaction-mode="multi-action" tells rows they contain more than one
control, which changes their keyboard model: trailing buttons get their own
focus stops and a click on one does not activate the row’s primary action.
Set it whenever rows carry trailing controls — leaving it at single-action
gives the row the wrong keyboard model.
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list interaction-mode="multi-action" label="Files" style="inline-size: 380px;">
<md-list-item type="button" headline="report.pdf" supporting-text="2.4 MB" leading-icon="picture_as_pdf">
<md-icon-button slot="trailing" icon="bookmark_border" aria-label="Bookmark report.pdf"></md-icon-button>
<md-icon-button slot="trailing" icon="more_vert" aria-label="More actions for report.pdf"></md-icon-button>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="budget.xlsx" supporting-text="812 KB" leading-icon="table_chart">
<md-icon-button slot="trailing" icon="bookmark_border" aria-label="Bookmark budget.xlsx"></md-icon-button>
<md-icon-button slot="trailing" icon="more_vert" aria-label="More actions for budget.xlsx"></md-icon-button>
</md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdDivider, MdIconButton, MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList interactionMode="multi-action" label="Files" style={{ inlineSize: '380px' }}>
<MdListItem type="button" headline="report.pdf" supportingText="2.4 MB" leadingIcon="picture_as_pdf">
<MdIconButton slot="trailing" icon="bookmark_border" aria-label="Bookmark report.pdf"></MdIconButton>
<MdIconButton slot="trailing" icon="more_vert" aria-label="More actions for report.pdf"></MdIconButton>
</MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="budget.xlsx" supportingText="812 KB" leadingIcon="table_chart">
<MdIconButton slot="trailing" icon="bookmark_border" aria-label="Bookmark budget.xlsx"></MdIconButton>
<MdIconButton slot="trailing" icon="more_vert" aria-label="More actions for budget.xlsx"></MdIconButton>
</MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list interaction-mode="multi-action" label="Files" style="inline-size: 380px;">
<md-list-item type="button" headline="report.pdf" supporting-text="2.4 MB" leading-icon="picture_as_pdf">
<md-icon-button slot="trailing" icon="bookmark_border" aria-label="Bookmark report.pdf"></md-icon-button>
<md-icon-button slot="trailing" icon="more_vert" aria-label="More actions for report.pdf"></md-icon-button>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="budget.xlsx" supporting-text="812 KB" leading-icon="table_chart">
<md-icon-button slot="trailing" icon="bookmark_border" aria-label="Bookmark budget.xlsx"></md-icon-button>
<md-icon-button slot="trailing" icon="more_vert" aria-label="More actions for budget.xlsx"></md-icon-button>
</md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list interaction-mode="multi-action" label="Files" style="inline-size: 380px;">
<md-list-item type="button" headline="report.pdf" supporting-text="2.4 MB" leading-icon="picture_as_pdf">
<md-icon-button slot="trailing" icon="bookmark_border" aria-label="Bookmark report.pdf"></md-icon-button>
<md-icon-button slot="trailing" icon="more_vert" aria-label="More actions for report.pdf"></md-icon-button>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="budget.xlsx" supporting-text="812 KB" leading-icon="table_chart">
<md-icon-button slot="trailing" icon="bookmark_border" aria-label="Bookmark budget.xlsx"></md-icon-button>
<md-icon-button slot="trailing" icon="more_vert" aria-label="More actions for budget.xlsx"></md-icon-button>
</md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list interaction-mode="multi-action" label="Files" style="inline-size: 380px;">
<md-list-item type="button" headline="report.pdf" supporting-text="2.4 MB" leading-icon="picture_as_pdf">
<md-icon-button slot="trailing" icon="bookmark_border" aria-label="Bookmark report.pdf"></md-icon-button>
<md-icon-button slot="trailing" icon="more_vert" aria-label="More actions for report.pdf"></md-icon-button>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="budget.xlsx" supporting-text="812 KB" leading-icon="table_chart">
<md-icon-button slot="trailing" icon="bookmark_border" aria-label="Bookmark budget.xlsx"></md-icon-button>
<md-icon-button slot="trailing" icon="more_vert" aria-label="More actions for budget.xlsx"></md-icon-button>
</md-list-item>
</md-list>Trailing supporting text is a prop; anything richer goes in the trailing slot,
and the same applies to leading, headline and supporting-text:
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="Trailing text" style="inline-size: 300px;">
<md-list-item lines="2" headline="Storage" supporting-text="Documents" trailing-supporting-text="12.4 GB"></md-list-item>
<md-list-item lines="2" headline="Backups" supporting-text="Weekly" trailing-supporting-text="3.1 GB"></md-list-item>
</md-list>
<md-list label="Slotted regions" style="inline-size: 320px;">
<md-list-item lines="2">
<span slot="leading" class="material-symbols-outlined" aria-hidden="true">alternate_email</span>
<span slot="headline">Mentions <strong>you</strong></span>
<span slot="supporting-text">Two unread threads</span>
<md-switch slot="trailing" aria-label="Notify me about mentions"></md-switch>
</md-list-item>
</md-list>
</div>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdList, MdListItem, MdSwitch } from '@awc-ui/react';
export function Demo() {
return (
<>
<div style={{ display: 'flex', gap: '24px', flexWrap: 'wrap' }}>
<MdList label="Trailing text" style={{ inlineSize: '300px' }}>
<MdListItem lines="2" headline="Storage" supportingText="Documents" trailingSupportingText="12.4 GB"></MdListItem>
<MdListItem lines="2" headline="Backups" supportingText="Weekly" trailingSupportingText="3.1 GB"></MdListItem>
</MdList>
<MdList label="Slotted regions" style={{ inlineSize: '320px' }}>
<MdListItem lines="2">
<span slot="leading" className="material-symbols-outlined" aria-hidden="true">alternate_email</span>
<span slot="headline">Mentions <strong>you</strong></span>
<span slot="supporting-text">Two unread threads</span>
<MdSwitch slot="trailing" aria-label="Notify me about mentions"></MdSwitch>
</MdListItem>
</MdList>
</div>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="Trailing text" style="inline-size: 300px;">
<md-list-item lines="2" headline="Storage" supporting-text="Documents" trailing-supporting-text="12.4 GB"></md-list-item>
<md-list-item lines="2" headline="Backups" supporting-text="Weekly" trailing-supporting-text="3.1 GB"></md-list-item>
</md-list>
<md-list label="Slotted regions" style="inline-size: 320px;">
<md-list-item lines="2">
<span slot="leading" class="material-symbols-outlined" aria-hidden="true">alternate_email</span>
<span slot="headline">Mentions <strong>you</strong></span>
<span slot="supporting-text">Two unread threads</span>
<md-switch slot="trailing" aria-label="Notify me about mentions"></md-switch>
</md-list-item>
</md-list>
</div><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="Trailing text" style="inline-size: 300px;">
<md-list-item lines="2" headline="Storage" supporting-text="Documents" trailing-supporting-text="12.4 GB"></md-list-item>
<md-list-item lines="2" headline="Backups" supporting-text="Weekly" trailing-supporting-text="3.1 GB"></md-list-item>
</md-list>
<md-list label="Slotted regions" style="inline-size: 320px;">
<md-list-item lines="2">
<span slot="leading" class="material-symbols-outlined" aria-hidden="true">alternate_email</span>
<span slot="headline">Mentions <strong>you</strong></span>
<span slot="supporting-text">Two unread threads</span>
<md-switch slot="trailing" aria-label="Notify me about mentions"></md-switch>
</md-list-item>
</md-list>
</div>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<div style="display: flex; gap: 24px; flex-wrap: wrap;">
<md-list label="Trailing text" style="inline-size: 300px;">
<md-list-item lines="2" headline="Storage" supporting-text="Documents" trailing-supporting-text="12.4 GB"></md-list-item>
<md-list-item lines="2" headline="Backups" supporting-text="Weekly" trailing-supporting-text="3.1 GB"></md-list-item>
</md-list>
<md-list label="Slotted regions" style="inline-size: 320px;">
<md-list-item lines="2">
<span slot="leading" class="material-symbols-outlined" aria-hidden="true">alternate_email</span>
<span slot="headline">Mentions <strong>you</strong></span>
<span slot="supporting-text">Two unread threads</span>
<md-switch slot="trailing" aria-label="Notify me about mentions"></md-switch>
</md-list-item>
</md-list>
</div>Note the accessible names: “More actions for report.pdf”, not “More actions”. In a list of ten rows the bare label is useless.
A row marked expandable reveals slot="expanded-content" children inline
below it, with an automatic caret. The children are flat rows, not a nested
sub-list, and a child selection re-emits on the list’s mdSelect carrying both
the parent index and the childIndex.
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list selection-mode="single-select" label="Expansion list" style="inline-size: 340px;">
<md-list-item type="button" headline="Shared with me" leading-icon="folder_shared" expandable expanded>
<md-list-item slot="expanded-content" type="button" headline="Q3 planning" leading-icon="description"></md-list-item>
<md-list-item slot="expanded-content" type="button" headline="Design review" leading-icon="description" selected></md-list-item>
<md-list-item slot="expanded-content" type="button" headline="Budget draft" leading-icon="description"></md-list-item>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Recent" leading-icon="schedule" expandable>
<md-list-item slot="expanded-content" type="button" headline="notes.txt" leading-icon="description"></md-list-item>
<md-list-item slot="expanded-content" type="button" headline="agenda.md" leading-icon="description"></md-list-item>
</md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdDivider, MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList selectionMode="single-select" label="Expansion list" style={{ inlineSize: '340px' }}>
<MdListItem type="button" headline="Shared with me" leadingIcon="folder_shared" expandable expanded>
<MdListItem slot="expanded-content" type="button" headline="Q3 planning" leadingIcon="description"></MdListItem>
<MdListItem slot="expanded-content" type="button" headline="Design review" leadingIcon="description" selected></MdListItem>
<MdListItem slot="expanded-content" type="button" headline="Budget draft" leadingIcon="description"></MdListItem>
</MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Recent" leadingIcon="schedule" expandable>
<MdListItem slot="expanded-content" type="button" headline="notes.txt" leadingIcon="description"></MdListItem>
<MdListItem slot="expanded-content" type="button" headline="agenda.md" leadingIcon="description"></MdListItem>
</MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list selection-mode="single-select" label="Expansion list" style="inline-size: 340px;">
<md-list-item type="button" headline="Shared with me" leading-icon="folder_shared" expandable expanded>
<md-list-item slot="expanded-content" type="button" headline="Q3 planning" leading-icon="description"></md-list-item>
<md-list-item slot="expanded-content" type="button" headline="Design review" leading-icon="description" selected></md-list-item>
<md-list-item slot="expanded-content" type="button" headline="Budget draft" leading-icon="description"></md-list-item>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Recent" leading-icon="schedule" expandable>
<md-list-item slot="expanded-content" type="button" headline="notes.txt" leading-icon="description"></md-list-item>
<md-list-item slot="expanded-content" type="button" headline="agenda.md" leading-icon="description"></md-list-item>
</md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list selection-mode="single-select" label="Expansion list" style="inline-size: 340px;">
<md-list-item type="button" headline="Shared with me" leading-icon="folder_shared" expandable expanded>
<md-list-item slot="expanded-content" type="button" headline="Q3 planning" leading-icon="description"></md-list-item>
<md-list-item slot="expanded-content" type="button" headline="Design review" leading-icon="description" selected></md-list-item>
<md-list-item slot="expanded-content" type="button" headline="Budget draft" leading-icon="description"></md-list-item>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Recent" leading-icon="schedule" expandable>
<md-list-item slot="expanded-content" type="button" headline="notes.txt" leading-icon="description"></md-list-item>
<md-list-item slot="expanded-content" type="button" headline="agenda.md" leading-icon="description"></md-list-item>
</md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list selection-mode="single-select" label="Expansion list" style="inline-size: 340px;">
<md-list-item type="button" headline="Shared with me" leading-icon="folder_shared" expandable expanded>
<md-list-item slot="expanded-content" type="button" headline="Q3 planning" leading-icon="description"></md-list-item>
<md-list-item slot="expanded-content" type="button" headline="Design review" leading-icon="description" selected></md-list-item>
<md-list-item slot="expanded-content" type="button" headline="Budget draft" leading-icon="description"></md-list-item>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Recent" leading-icon="schedule" expandable>
<md-list-item slot="expanded-content" type="button" headline="notes.txt" leading-icon="description"></md-list-item>
<md-list-item slot="expanded-content" type="button" headline="agenda.md" leading-icon="description"></md-list-item>
</md-list-item>
</md-list>Expandable rows inside a segmented list behave the same way, with each group
keeping its own corner radii.
reorderable gives every row a trailing drag handle and emits mdReorder on
drop. The list persists nothing. e.detail.order is the new order
expressed as the original authored indices, so order[newPosition] is the old
position — one pass is enough to reorder a backing array.
Reordering is not pointer-only: with focus on a row, Alt + ArrowUp /
Alt + ArrowDown move it one position and emit the same mdReorder. The list
re-focuses the row at its new position, so a run of keystrokes keeps working
without re-aiming.
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list reorderable interaction-mode="multi-action" label="Playlist" style="inline-size: 360px;">
<md-list-item type="button" headline="Midnight City" supporting-text="M83" leading-icon="music_note"></md-list-item>
<md-list-item type="button" headline="Instant Crush" supporting-text="Daft Punk" leading-icon="music_note"></md-list-item>
<md-list-item type="button" headline="The Less I Know the Better" supporting-text="Tame Impala" leading-icon="music_note"></md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList reorderable interactionMode="multi-action" label="Playlist" style={{ inlineSize: '360px' }}>
<MdListItem type="button" headline="Midnight City" supportingText="M83" leadingIcon="music_note"></MdListItem>
<MdListItem type="button" headline="Instant Crush" supportingText="Daft Punk" leadingIcon="music_note"></MdListItem>
<MdListItem type="button" headline="The Less I Know the Better" supportingText="Tame Impala" leadingIcon="music_note"></MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list reorderable interaction-mode="multi-action" label="Playlist" style="inline-size: 360px;">
<md-list-item type="button" headline="Midnight City" supporting-text="M83" leading-icon="music_note"></md-list-item>
<md-list-item type="button" headline="Instant Crush" supporting-text="Daft Punk" leading-icon="music_note"></md-list-item>
<md-list-item type="button" headline="The Less I Know the Better" supporting-text="Tame Impala" leading-icon="music_note"></md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list reorderable interaction-mode="multi-action" label="Playlist" style="inline-size: 360px;">
<md-list-item type="button" headline="Midnight City" supporting-text="M83" leading-icon="music_note"></md-list-item>
<md-list-item type="button" headline="Instant Crush" supporting-text="Daft Punk" leading-icon="music_note"></md-list-item>
<md-list-item type="button" headline="The Less I Know the Better" supporting-text="Tame Impala" leading-icon="music_note"></md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list reorderable interaction-mode="multi-action" label="Playlist" style="inline-size: 360px;">
<md-list-item type="button" headline="Midnight City" supporting-text="M83" leading-icon="music_note"></md-list-item>
<md-list-item type="button" headline="Instant Crush" supporting-text="Daft Punk" leading-icon="music_note"></md-list-item>
<md-list-item type="button" headline="The Less I Know the Better" supporting-text="Tame Impala" leading-icon="music_note"></md-list-item>
</md-list><!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list label="Row states" style="inline-size: 340px;">
<md-list-item type="button" headline="Enabled" supporting-text="Focusable and clickable" leading-icon="check"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Disabled" supporting-text="Out of the tab order" leading-icon="block" disabled></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Soft-disabled" supporting-text="Still reachable by keyboard" leading-icon="lock" soft-disabled></md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdDivider, MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList label="Row states" style={{ inlineSize: '340px' }}>
<MdListItem type="button" headline="Enabled" supportingText="Focusable and clickable" leadingIcon="check"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Disabled" supportingText="Out of the tab order" leadingIcon="block" disabled></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Soft-disabled" supportingText="Still reachable by keyboard" leadingIcon="lock" soft-disabled></MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list label="Row states" style="inline-size: 340px;">
<md-list-item type="button" headline="Enabled" supporting-text="Focusable and clickable" leading-icon="check"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Disabled" supporting-text="Out of the tab order" leading-icon="block" disabled></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Soft-disabled" supporting-text="Still reachable by keyboard" leading-icon="lock" soft-disabled></md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list label="Row states" style="inline-size: 340px;">
<md-list-item type="button" headline="Enabled" supporting-text="Focusable and clickable" leading-icon="check"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Disabled" supporting-text="Out of the tab order" leading-icon="block" disabled></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Soft-disabled" supporting-text="Still reachable by keyboard" leading-icon="lock" soft-disabled></md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list label="Row states" style="inline-size: 340px;">
<md-list-item type="button" headline="Enabled" supporting-text="Focusable and clickable" leading-icon="check"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Disabled" supporting-text="Out of the tab order" leading-icon="block" disabled></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Soft-disabled" supporting-text="Still reachable by keyboard" leading-icon="lock" soft-disabled></md-list-item>
</md-list><!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list label="Long content" style="max-inline-size: 340px;">
<md-list-item lines="3" headline="A headline long enough that it has to wrap onto a second line in this column" supporting-text="Supporting text that also runs well past the available width and keeps going." leading-icon="subject"></md-list-item>
<md-list-item lines="1" headline="A one-line row whose headline is far too long for the space it has been given"></md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList label="Long content" style={{ maxInlineSize: '340px' }}>
<MdListItem lines="3" headline="A headline long enough that it has to wrap onto a second line in this column" supportingText="Supporting text that also runs well past the available width and keeps going." leadingIcon="subject"></MdListItem>
<MdListItem lines="1" headline="A oneLine row whose headline is far too long for the space it has been given"></MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list label="Long content" style="max-inline-size: 340px;">
<md-list-item lines="3" headline="A headline long enough that it has to wrap onto a second line in this column" supporting-text="Supporting text that also runs well past the available width and keeps going." leading-icon="subject"></md-list-item>
<md-list-item lines="1" headline="A one-line row whose headline is far too long for the space it has been given"></md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list label="Long content" style="max-inline-size: 340px;">
<md-list-item lines="3" headline="A headline long enough that it has to wrap onto a second line in this column" supporting-text="Supporting text that also runs well past the available width and keeps going." leading-icon="subject"></md-list-item>
<md-list-item lines="1" headline="A one-line row whose headline is far too long for the space it has been given"></md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list label="Long content" style="max-inline-size: 340px;">
<md-list-item lines="3" headline="A headline long enough that it has to wrap onto a second line in this column" supporting-text="Supporting text that also runs well past the available width and keeps going." leading-icon="subject"></md-list-item>
<md-list-item lines="1" headline="A one-line row whose headline is far too long for the space it has been given"></md-list-item>
</md-list>The second row is the trap: lines="1" does not clip text, it only sizes the
row for one line.
Everything above shows one prop at a time. A real list is a combination —
here segmented gives each preference its own tile, multi-action gives the
switches their own focus stops, and each switch names the row it controls:
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list list-style="segmented" interaction-mode="multi-action" label="Notification preferences" style="inline-size: 380px;">
<md-list-item lines="2" headline="Email" supporting-text="A digest, once a day" leading-icon="mail">
<md-switch slot="trailing" selected aria-label="Email notifications"></md-switch>
</md-list-item>
<md-list-item lines="2" headline="Push" supporting-text="Instant, on this device" leading-icon="notifications">
<md-switch slot="trailing" selected aria-label="Push notifications"></md-switch>
</md-list-item>
<md-list-item lines="2" headline="SMS" supporting-text="Security alerts only" leading-icon="sms">
<md-switch slot="trailing" aria-label="SMS notifications"></md-switch>
</md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdList, MdListItem, MdSwitch } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList listStyle="segmented" interactionMode="multi-action" label="Notification preferences" style={{ inlineSize: '380px' }}>
<MdListItem lines="2" headline="Email" supportingText="A digest, once a day" leadingIcon="mail">
<MdSwitch slot="trailing" selected aria-label="Email notifications"></MdSwitch>
</MdListItem>
<MdListItem lines="2" headline="Push" supportingText="Instant, on this device" leadingIcon="notifications">
<MdSwitch slot="trailing" selected aria-label="Push notifications"></MdSwitch>
</MdListItem>
<MdListItem lines="2" headline="SMS" supportingText="Security alerts only" leadingIcon="sms">
<MdSwitch slot="trailing" aria-label="SMS notifications"></MdSwitch>
</MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list list-style="segmented" interaction-mode="multi-action" label="Notification preferences" style="inline-size: 380px;">
<md-list-item lines="2" headline="Email" supporting-text="A digest, once a day" leading-icon="mail">
<md-switch slot="trailing" selected aria-label="Email notifications"></md-switch>
</md-list-item>
<md-list-item lines="2" headline="Push" supporting-text="Instant, on this device" leading-icon="notifications">
<md-switch slot="trailing" selected aria-label="Push notifications"></md-switch>
</md-list-item>
<md-list-item lines="2" headline="SMS" supporting-text="Security alerts only" leading-icon="sms">
<md-switch slot="trailing" aria-label="SMS notifications"></md-switch>
</md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list list-style="segmented" interaction-mode="multi-action" label="Notification preferences" style="inline-size: 380px;">
<md-list-item lines="2" headline="Email" supporting-text="A digest, once a day" leading-icon="mail">
<md-switch slot="trailing" selected aria-label="Email notifications"></md-switch>
</md-list-item>
<md-list-item lines="2" headline="Push" supporting-text="Instant, on this device" leading-icon="notifications">
<md-switch slot="trailing" selected aria-label="Push notifications"></md-switch>
</md-list-item>
<md-list-item lines="2" headline="SMS" supporting-text="Security alerts only" leading-icon="sms">
<md-switch slot="trailing" aria-label="SMS notifications"></md-switch>
</md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list list-style="segmented" interaction-mode="multi-action" label="Notification preferences" style="inline-size: 380px;">
<md-list-item lines="2" headline="Email" supporting-text="A digest, once a day" leading-icon="mail">
<md-switch slot="trailing" selected aria-label="Email notifications"></md-switch>
</md-list-item>
<md-list-item lines="2" headline="Push" supporting-text="Instant, on this device" leading-icon="notifications">
<md-switch slot="trailing" selected aria-label="Push notifications"></md-switch>
</md-list-item>
<md-list-item lines="2" headline="SMS" supporting-text="Security alerts only" leading-icon="sms">
<md-switch slot="trailing" aria-label="SMS notifications"></md-switch>
</md-list-item>
</md-list>The multi-action Files demo further up is the same idea applied to a file
manager: multi-action for the trailing controls, row-scoped names on each of
them, and the row’s own primary action left intact.
| Event | Cancelable | Detail | Fires |
|---|---|---|---|
mdSelect | no | MdListSelectDetail | The selected set changed |
mdActivate | no | { index, item } | The active (roved) row changed — click or arrow key |
mdReorder | no | { from, to, order } | A drag-reorder completed |
type MdListSelectDetail = { index: number; // top-level row index (parent index for expanded children) value: string; selected: boolean; item: HTMLMdListItemElement; childIndex?: number; // index within the parent's expanded-content slot expanded?: boolean; // whether that expandable parent is open};Methods — activateNext(), activatePrevious(), selectItem(index),
getSelectedIndices(). All four are async.
Click a row, arrow-key between rows, and move one with a drag handle or with
Alt + ArrowUp / Alt + ArrowDown — all three events land in the same log:
<md-list id="files" label="Files" selection-mode="multi-select" interaction-mode="multi-action" reorderable>
<md-list-item type="button" headline="report.pdf"></md-list-item>
<md-list-item type="button" headline="budget.xlsx"></md-list-item>
<md-list-item type="button" headline="notes.txt"></md-list-item>
</md-list>
<script type="module">
const list = document.getElementById('files');
list.addEventListener('mdSelect', async (e) => {
console.log(e.detail.index, e.detail.value, e.detail.selected);
console.log('selected set', await list.getSelectedIndices());
});
list.addEventListener('mdActivate', (e) => {
console.log('active row', e.detail.index);
});
list.addEventListener('mdReorder', (e) => {
console.log(e.detail.from, e.detail.to, e.detail.order);
});
</script>import { MdList, MdListItem } from '@awc-ui/react';
import { useRef } from 'react';
export function FileList() {
const listRef = useRef<HTMLMdListElement>(null);
return (
<MdList
ref={listRef}
label="Files"
selectionMode="multi-select"
interactionMode="multi-action"
reorderable
onMdSelect={async (e) => {
console.log(e.detail.index, e.detail.value, e.detail.selected);
console.log('selected set', await listRef.current?.getSelectedIndices());
}}
onMdActivate={(e) => console.log('active row', e.detail.index)}
onMdReorder={(e) => console.log(e.detail.from, e.detail.to, e.detail.order)}
>
<MdListItem type="button" headline="report.pdf" />
<MdListItem type="button" headline="budget.xlsx" />
<MdListItem type="button" headline="notes.txt" />
</MdList>
);
}import { Component, ElementRef, ViewChild } from '@angular/core';
@Component({
selector: 'app-file-list',
template: `
<md-list
#list
label="Files"
selection-mode="multi-select"
interaction-mode="multi-action"
reorderable
(mdSelect)="onSelect($event)"
(mdActivate)="onActivate($event)"
(mdReorder)="onReorder($event)"
>
<md-list-item type="button" headline="report.pdf"></md-list-item>
<md-list-item type="button" headline="budget.xlsx"></md-list-item>
<md-list-item type="button" headline="notes.txt"></md-list-item>
</md-list>
`,
})
export class FileListComponent {
@ViewChild('list') list!: ElementRef<HTMLMdListElement>;
async onSelect(e: CustomEvent) {
console.log(e.detail.index, e.detail.value, e.detail.selected);
console.log('selected set', await this.list.nativeElement.getSelectedIndices());
}
onActivate(e: CustomEvent) {
console.log('active row', e.detail.index);
}
onReorder(e: CustomEvent) {
console.log(e.detail.from, e.detail.to, e.detail.order);
}
}<script setup lang="ts">
import { ref } from 'vue';
const list = ref<HTMLMdListElement | null>(null);
async function onSelect(e: CustomEvent) {
console.log(e.detail.index, e.detail.value, e.detail.selected);
console.log('selected set', await list.value?.getSelectedIndices());
}
function onActivate(e: CustomEvent) {
console.log('active row', e.detail.index);
}
function onReorder(e: CustomEvent) {
console.log(e.detail.from, e.detail.to, e.detail.order);
}
</script>
<template>
<md-list
ref="list"
label="Files"
selection-mode="multi-select"
interaction-mode="multi-action"
reorderable
@mdSelect="onSelect"
@mdActivate="onActivate"
@mdReorder="onReorder"
>
<md-list-item type="button" headline="report.pdf" />
<md-list-item type="button" headline="budget.xlsx" />
<md-list-item type="button" headline="notes.txt" />
</md-list>
</template><script lang="ts">
let list: HTMLMdListElement;
async function onSelect(e: CustomEvent) {
console.log(e.detail.index, e.detail.value, e.detail.selected);
console.log('selected set', await list.getSelectedIndices());
}
function onActivate(e: CustomEvent) {
console.log('active row', e.detail.index);
}
function onReorder(e: CustomEvent) {
console.log(e.detail.from, e.detail.to, e.detail.order);
}
</script>
<md-list
bind:this={list}
label="Files"
selection-mode="multi-select"
interaction-mode="multi-action"
reorderable
on:mdSelect={onSelect}
on:mdActivate={onActivate}
on:mdReorder={onReorder}
>
<md-list-item type="button" headline="report.pdf" />
<md-list-item type="button" headline="budget.xlsx" />
<md-list-item type="button" headline="notes.txt" />
</md-list>The demo above only reads the events. The next step is keeping a backing array in
sync, which is the one thing the markup cannot express — order[newPosition] is
the old position, so a single map re-sorts the data:
<md-list id="files" label="Files" selection-mode="multi-select" interaction-mode="multi-action" reorderable>
<md-list-item type="button" headline="report.pdf"></md-list-item>
<md-list-item type="button" headline="budget.xlsx"></md-list-item>
</md-list>
<script type="module">
const list = document.getElementById('files');
list.addEventListener('mdSelect', async () => {
console.log(await list.getSelectedIndices());
});
list.addEventListener('mdActivate', (e) => {
console.log('active row', e.detail.index);
});
// The list reports the new order — you persist it.
list.addEventListener('mdReorder', (e) => {
const { order } = e.detail;
files = order.map((originalIndex) => files[originalIndex]);
save(files);
});
</script>import { MdList, MdListItem } from '@awc-ui/react';
import { useRef, useState } from 'react';
export function FileList() {
const listRef = useRef<HTMLMdListElement>(null);
const [files, setFiles] = useState(['report.pdf', 'budget.xlsx']);
return (
<MdList
ref={listRef}
label="Files"
selectionMode="multi-select"
interactionMode="multi-action"
reorderable
onMdSelect={async () => {
console.log(await listRef.current?.getSelectedIndices());
}}
onMdActivate={(e) => console.log('active row', e.detail.index)}
onMdReorder={(e) => {
setFiles((prev) => e.detail.order.map((i: number) => prev[i]));
}}
>
{files.map((name) => (
<MdListItem key={name} type="button" headline={name} />
))}
</MdList>
);
}import { Component, ElementRef, ViewChild } from '@angular/core';
@Component({
selector: 'app-file-list',
template: `
<md-list
#list
label="Files"
selection-mode="multi-select"
interaction-mode="multi-action"
reorderable
(mdSelect)="onSelect()"
(mdActivate)="onActivate($event)"
(mdReorder)="onReorder($event)"
>
<md-list-item *ngFor="let f of files" type="button" [headline]="f"></md-list-item>
</md-list>
`,
})
export class FileListComponent {
@ViewChild('list') list!: ElementRef<any>;
files = ['report.pdf', 'budget.xlsx'];
async onSelect() {
console.log(await this.list.nativeElement.getSelectedIndices());
}
onActivate(e: CustomEvent) {
console.log('active row', e.detail.index);
}
onReorder(e: CustomEvent) {
this.files = e.detail.order.map((i: number) => this.files[i]);
}
}<script setup lang="ts">
import { ref } from 'vue';
const list = ref<any>(null);
const files = ref(['report.pdf', 'budget.xlsx']);
async function onSelect() {
console.log(await list.value?.getSelectedIndices());
}
function onReorder(e: CustomEvent) {
files.value = e.detail.order.map((i: number) => files.value[i]);
}
</script>
<template>
<md-list
ref="list"
label="Files"
selection-mode="multi-select"
interaction-mode="multi-action"
reorderable
@mdSelect="onSelect"
@mdActivate="(e) => console.log('active row', e.detail.index)"
@mdReorder="onReorder"
>
<md-list-item v-for="f in files" :key="f" type="button" :headline="f" />
</md-list>
</template><script lang="ts">
let list: any;
let files = ['report.pdf', 'budget.xlsx'];
async function onSelect() {
console.log(await list.getSelectedIndices());
}
function onReorder(e: CustomEvent) {
files = e.detail.order.map((i: number) => files[i]);
}
</script>
<md-list
bind:this={list}
label="Files"
selection-mode="multi-select"
interaction-mode="multi-action"
reorderable
on:mdSelect={onSelect}
on:mdActivate={(e) => console.log('active row', e.detail.index)}
on:mdReorder={onReorder}
>
{#each files as f (f)}
<md-list-item type="button" headline={f} />
{/each}
</md-list>| Property | Attribute | Type | Default | Reflects |
|---|---|---|---|---|
listStyle | list-style | MdListStyle | 'standard' | — |
selectionMode | selection-mode | MdListSelectionMode | 'none' | — |
interactionMode | interaction-mode | MdListInteractionMode | 'single-action' | — |
reorderable | reorderable | boolean | false | Yes |
label | label | string | '' | — |
labelledby | labelledby | string | '' | — |
roleOverride | role-override | string | '' | — |
density | density | 0 | -1 | -2 | -3 | -4 | 0 | Yes |
| Method | Parameters |
|---|---|
activateNext() | none |
activatePrevious() | none |
selectItem() | index: number |
getSelectedIndices() | none |
| Slot | Description |
|---|---|
(default) | — |
Override on the host element for per-instance theming:
| Property | Description |
|---|---|
--md-list-container-color | Container background |
--md-list-container-shape | Border-radius override |
--md-list-padding-block | Vertical padding inside the list |
--md-list-padding-inline | Horizontal padding inside the list |
--md-list-segmented-gap | Gap between rows in segmented mode (default 2px) |
--md-list-drop-placeholder-color | Drop-target ghost fill (default primary-container @ ~45%, on-theme) |
--md-list-drop-placeholder-shape | Drop-target ghost corner radius (default corner-large / 16px) |
--md-list-drop-placeholder-opacity | Drop-target ghost opacity (default 1) |
--md-list-drop-placeholder-outline-color | — |
--md-list-drop-placeholder-outline-width | — |
Style internal elements through shadow DOM with ::part():
| Part | Description |
|---|---|
drop-placeholder | Ghost slot shown in the lifted row's vacated position |
md-list-itemEach row is an md-list-item. Its API lives here rather than on a separate
page: outside a list it has no list semantics and no roving focus, and inside
one the parent writes several of its props for you.
leading-icon, leading-avatar and
leading-image compete for the same region — combining them is a bug, not a
layering feature.lines sets the height contract; it does not truncate. lines="1" with
three lines of text overflows. It auto-promotes (an overline implies 2
lines, overline + supporting-text implies 3), so set it explicitly only to
override.mdActivate / mdSelect are indexed and
reconciled; the row’s own mdClick / mdItemClick / mdItemSelect are
lower-level plumbing.selectionMode,
interactionMode, reorderable, rovingFocusVisible, containerRole. The
list writes them imperatively.expandable rows own their expansion (mdExpand, toggle(), expand(),
collapse()), which is entirely separate from selection.selection-mode on the parent, the row becomes focusable and clickable
regardless of type.Both rows below ask for the same three regions. The first uses props, the second
uses the matching slots — and the third proves the point: it sets headline and
leading-icon and slots them, and only the slotted content survives.
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list label="Props versus slots" style="inline-size: 400px;">
<md-list-item type="button" headline="Set by props" supporting-text="headline, supporting-text, leading-icon" leading-icon="tune" trailing-supporting-text="props"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" lines="2">
<span slot="leading" class="material-symbols-outlined" aria-hidden="true">tune</span>
<span slot="headline">Set by <strong>slots</strong></span>
<span slot="supporting-text">leading, headline, supporting-text</span>
<span slot="trailing-supporting-text">slots</span>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" lines="2" headline="This prop never renders" leading-icon="close">
<span slot="leading" class="material-symbols-outlined" aria-hidden="true">check</span>
<span slot="headline">The slot wins</span>
<span slot="supporting-text">The headline prop and leading-icon here are dead config</span>
</md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdDivider, MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList label="Props versus slots" style={{ inlineSize: '400px' }}>
<MdListItem type="button" headline="Set by props" supportingText="headline, supporting-text, leading-icon" leadingIcon="tune" trailingSupportingText="props"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" lines="2">
<span slot="leading" className="material-symbols-outlined" aria-hidden="true">tune</span>
<span slot="headline">Set by <strong>slots</strong></span>
<span slot="supporting-text">leading, headline, supporting-text</span>
<span slot="trailing-supporting-text">slots</span>
</MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" lines="2" headline="This prop never renders" leadingIcon="close">
<span slot="leading" className="material-symbols-outlined" aria-hidden="true">check</span>
<span slot="headline">The slot wins</span>
<span slot="supporting-text">The headline prop and leading-icon here are dead config</span>
</MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list label="Props versus slots" style="inline-size: 400px;">
<md-list-item type="button" headline="Set by props" supporting-text="headline, supporting-text, leading-icon" leading-icon="tune" trailing-supporting-text="props"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" lines="2">
<span slot="leading" class="material-symbols-outlined" aria-hidden="true">tune</span>
<span slot="headline">Set by <strong>slots</strong></span>
<span slot="supporting-text">leading, headline, supporting-text</span>
<span slot="trailing-supporting-text">slots</span>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" lines="2" headline="This prop never renders" leading-icon="close">
<span slot="leading" class="material-symbols-outlined" aria-hidden="true">check</span>
<span slot="headline">The slot wins</span>
<span slot="supporting-text">The headline prop and leading-icon here are dead config</span>
</md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list label="Props versus slots" style="inline-size: 400px;">
<md-list-item type="button" headline="Set by props" supporting-text="headline, supporting-text, leading-icon" leading-icon="tune" trailing-supporting-text="props"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" lines="2">
<span slot="leading" class="material-symbols-outlined" aria-hidden="true">tune</span>
<span slot="headline">Set by <strong>slots</strong></span>
<span slot="supporting-text">leading, headline, supporting-text</span>
<span slot="trailing-supporting-text">slots</span>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" lines="2" headline="This prop never renders" leading-icon="close">
<span slot="leading" class="material-symbols-outlined" aria-hidden="true">check</span>
<span slot="headline">The slot wins</span>
<span slot="supporting-text">The headline prop and leading-icon here are dead config</span>
</md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list label="Props versus slots" style="inline-size: 400px;">
<md-list-item type="button" headline="Set by props" supporting-text="headline, supporting-text, leading-icon" leading-icon="tune" trailing-supporting-text="props"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" lines="2">
<span slot="leading" class="material-symbols-outlined" aria-hidden="true">tune</span>
<span slot="headline">Set by <strong>slots</strong></span>
<span slot="supporting-text">leading, headline, supporting-text</span>
<span slot="trailing-supporting-text">slots</span>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" lines="2" headline="This prop never renders" leading-icon="close">
<span slot="leading" class="material-symbols-outlined" aria-hidden="true">check</span>
<span slot="headline">The slot wins</span>
<span slot="supporting-text">The headline prop and leading-icon here are dead config</span>
</md-list-item>
</md-list>| Property | Attribute | Type | Default | Reflects |
|---|---|---|---|---|
type | type | MdListItemType | 'text' | Yes |
headline | headline | string | '' | — |
overline | overline | string | '' | — |
supportingText | supporting-text | string | '' | — |
trailingSupportingText | trailing-supporting-text | string | '' | — |
leadingIcon | leading-icon | string | '' | — |
trailingIcon | trailing-icon | string | '' | — |
leadingAvatar | leading-avatar | string | '' | — |
leadingAvatarAlt | leading-avatar-alt | string | '' | — |
leadingAvatarName | leading-avatar-name | string | '' | — |
leadingAvatarLabel | leading-avatar-label | string | '' | — |
leadingImage | leading-image | string | '' | — |
leadingImageAlt | leading-image-alt | string | '' | — |
lines | lines | 1 | 2 | 3 | 1 | — |
href | href | string | '' | — |
target | target | string | '_self' | — |
disabled | disabled | boolean | false | Yes |
softDisabled | soft-disabled | boolean | false | Yes |
selected | selected | boolean | false | Yes |
expandable | expandable | boolean | false | Yes |
expanded | expanded | boolean | false | Yes |
tabbable | tabbable | boolean | true | — |
rovingFocusVisible | roving-focus-visible | boolean | false | — |
selectionMode | selection-mode | 'none' | 'single-select' | 'multi-select' | 'none' | — |
interactionMode | interaction-mode | 'single-action' | 'multi-action' | 'single-action' | — |
containerRole | container-role | string | '' | — |
reorderable | reorderable | boolean | false | — |
density | density | 0 | -1 | -2 | -3 | -4 | 0 | Yes |
| Method | Parameters |
|---|---|
setFocus() | options?: FocusOptions |
focusItem() | none |
toggle() | none |
expand() | none |
collapse() | none |
| Slot | Description |
|---|---|
(default) | — |
leading | Custom leading content (icon / avatar / image) |
overline | Rich overline (overrides `overline` prop) |
headline | Rich headline (overrides `headline` prop) |
supporting-text | Rich supporting text |
trailing | Custom trailing content (icon button, switch, etc.) |
trailing-supporting-text | Rich trailing supporting text |
expanded-content | Content revealed when an expandable row is expanded |
Override on the host element for per-instance theming:
| Property | Description |
|---|---|
--md-list-item-container-color | Container background (M3 default: surface = #FEF7FF light) |
--md-list-item-container-shape | Border-radius shorthand (all four corners) |
--md-list-item-container-shape-start-start | Top-start corner (used by md-list grouped style) |
--md-list-item-container-shape-start-end | Top-end corner (used by md-list grouped style) |
--md-list-item-container-shape-end-start | Bottom-start corner |
--md-list-item-container-shape-end-end | Bottom-end corner |
--md-list-item-active-container-shape | Meta-override applied to every active state |
--md-list-item-hover-container-shape | Border-radius on hover (default 0 — no morph; opt-in) |
--md-list-item-focus-container-shape | Border-radius on focus (default 16px / corner-large) |
--md-list-item-pressed-container-shape | Border-radius on press (default 16px / corner-large) |
--md-list-item-selected-container-shape | Border-radius on selected (default 16px / corner-large) |
--md-list-item-active-container-shape | Shared default for all four states above |
--md-list-item-dragged-container-shape | Border-radius on dragged (default 16px / corner-large) |
--md-list-item-hover-state-layer-opacity | State-layer opacity on hover (M3: 0.08) |
--md-list-item-focus-state-layer-opacity | State-layer opacity on focus (M3: 0.10) |
--md-list-item-pressed-state-layer-opacity | State-layer opacity on press (M3: 0.10) |
--md-list-item-dragged-state-layer-opacity | State-layer opacity when dragged (M3: 0.16) |
--md-list-item-label-text-color | Headline text color |
--md-list-item-label-text-font | Headline font family |
--md-list-item-supporting-text-color | Supporting text color |
--md-list-item-supporting-text-font | Supporting text font family |
--md-list-item-overline-color | Overline text color |
--md-list-item-trailing-supporting-text-color | Trailing supporting text color |
--md-list-item-trailing-supporting-text-font | Trailing supporting text font family |
--md-list-item-leading-icon-color | Leading icon color |
--md-list-item-leading-icon-size | Leading icon size, default (M3: 24px) |
--md-list-item-trailing-icon-color | Trailing icon color |
--md-list-item-unselected-trailing-icon-color | Trailing icon color when row is in selection |
--md-list-item-trailing-icon-size | Trailing icon size, default (M3: 24px) |
--md-list-item-trailing-icon-expressive-size | Trailing icon size, Expressive list-style (M3: 20px) |
--md-list-item-leading-space | Inline-start padding (M3: 16px) |
--md-list-item-trailing-space | Inline-end padding (M3: 16px) |
--md-list-item-top-space | Block-start padding (M3: 8px) |
--md-list-item-bottom-space | Block-end padding (M3: 10px) |
--md-list-item-between-space | Gap between leading / content / trailing (M3: 12px) |
--md-list-item-three-line-top-space | Block-start padding when 3-line / 88px+ (M3: 12px) |
--md-list-item-three-line-bottom-space | Block-end padding when 3-line / 88px+ (M3: 12px) |
--md-list-item-dragged-container-elevation | Box-shadow applied when host carries |
--md-list-item-leading-video-width | Width of <video slot="leading"> thumbnail (M3: 100px) |
--md-list-item-leading-video-height | Height of <video slot="leading"> thumbnail (M3: 56px) |
--md-list-item-leading-video-shape | Border-radius of <video slot="leading"> (M3: corner-small) |
--md-list-item-leading-video-top-space | Block-start padding bumped when the row carries |
--md-list-item-leading-avatar-color | Avatar circle color (label avatar) |
--md-list-item-leading-avatar-label-color | Avatar label text color |
--md-list-item-leading-avatar-size | Avatar dimensions (default 40px) |
--md-list-item-leading-avatar-shape | Avatar border-radius (default full) |
--md-list-item-leading-image-width | Image thumbnail width (default 56px) |
--md-list-item-leading-image-height | Image thumbnail height (default 56px) |
--md-list-item-leading-image-shape | Image thumbnail radius, default (M3: 0) |
--md-list-item-leading-image-expressive-shape | Image thumbnail radius, Expressive list-style |
--md-list-item-leading-image-selection-scrim-color | Full-thumbnail scrim when selected (M3: scrim @ 32%) |
--md-list-item-leading-image-selection-circle-color | Checkmark circle fill when selected (M3: on-surface @ 60%) |
--md-list-item-leading-image-selection-icon-color | Checkmark glyph color (M3: surface / white) |
--md-list-item-leading-image-selection-icon-size | Checkmark circle diameter (M3: 24px) |
--md-list-item-selected-container-color | Selected container background (M3: secondary-container) |
--md-list-item-selected-label-text-color | Selected headline color (M3: on-secondary-container) |
--md-list-item-selected-active-icon-color | Leading/trailing icon color when row is BOTH |
--md-list-item-selected-disabled-container-color | Container fill when row is BOTH selected AND |
--md-list-item-expand-chevron-color | Caret icon color when collapsed (forwarded to the |
--md-list-item-expand-duration | Expanded-panel open duration (M3: medium3 / 350ms) |
--md-list-item-collapse-duration | Expanded-panel close duration (M3: short4 / 200ms) |
--md-list-item-expanded-panel-padding-block | Expanded panel vertical padding |
--md-list-item-expanded-panel-padding-inline | Expanded panel horizontal padding (both sides) |
--md-list-item-expanded-panel-padding-inline-start | Expanded panel start padding — |
--md-list-item-expanded-panel-background | Expanded panel background |
--md-list-item-leading-icon-expressive-size | — |
--md-list-item-disabled-state-layer-opacity | — |
--md-list-item-expand-button-size | — |
--md-list-item-expand-chevron-size | — |
Style internal elements through shadow DOM with ::part():
| Part | Description |
|---|---|
leading | Leading slot container |
avatar | Leading avatar (image or label) |
image-wrap | Wrapper around prop-based leading image + selection overlay |
image | Leading image thumbnail |
image-selection-indicator | Selected-state scrim overlay on image thumbnail |
image-selection-circle | Checkmark circle fill centered on thumbnail |
image-selection-check | Material Symbols check glyph inside the circle |
leading-icon | Leading Material Symbols icon |
content | Content slot container (overline + headline + supporting) |
overline | Overline text element |
headline | Headline text element |
supporting-text | Supporting text element |
trailing | Trailing slot container |
trailing-supporting-text | Trailing supporting text element |
trailing-icon | Trailing Material Symbols icon |
expand-button | Trailing caret md-icon-button on expandable rows |
drag-handle | Trailing drag grip on reorderable rows |
primary | — |
row | Row chassis (leading + content + trailing) |
state-layer | State-layer overlay (interactive rows only) |
expanded-panel | Wrapper revealed when `expanded` is true |
expanded-panel-inner | Inner wrapper that holds the slot |
avatar-image | — |
avatar-initials | — |
avatar-icon | — |
headline-tooltip-popup | Popup of the headline overflow tooltip (forwarded) |
supporting-tooltip-popup | Popup of the supporting-text overflow tooltip (forwarded) |
expand-button-state-layer | State-layer of the caret button (forwarded) |
expand-button-icon | Icon glyph wrapper of the caret button (forwarded; |
label or labelledby — an unnamed list of rows is hard
to navigate with a screen reader, and M3 asks for it explicitly.multi-action rows, every embedded control needs its own accessible
name identifying which row it belongs to.aria-selected), not by the list
wrapper; multi-select adds aria-multiselectable to the list.Alt + ArrowUp /
Alt + ArrowDown on the focused row — so a reorderable list is not
pointer-only. It is silent, though: announce the move yourself from
mdReorder if the reorder is a primary task.role-override exists for cases where the list is really a listbox or menu
in context. Leave it empty unless you know you need it.headline is the row’s primary accessible text. Decorative leading
visuals should be hidden from assistive tech — a leading-avatar beside the
same name in the headline is redundant, and leading-image-alt should be
empty for a purely decorative thumbnail.disabled leaves the tab order while soft-disabled stays
focusable, so the row remains discoverable.trailing-icon such as chevron_right must be swapped by you
under RTL; everything else mirrors automatically.Tab into the list below: it takes one tab stop, not four. Arrow keys move
between rows, Home / End jump to the ends, and typing a letter jumps to the
first row whose headline starts with it. Because these rows are multi-action,
Tab from a row reaches its own trailing button — and each of those buttons
names its row, so a screen reader announces “Archive report.pdf”, never a bare
“Archive”.
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list interaction-mode="multi-action" label="Documents" style="inline-size: 380px;">
<md-list-item type="button" headline="report.pdf" supporting-text="Focusable — press Enter to activate" leading-icon="picture_as_pdf">
<md-icon-button slot="trailing" icon="archive" aria-label="Archive report.pdf"></md-icon-button>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="text" headline="budget.xlsx" supporting-text="A text row — skipped by roving focus" leading-icon="table_chart"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Sealed contract" supporting-text="Soft-disabled — still reachable, still announced" leading-icon="lock" soft-disabled>
<md-icon-button slot="trailing" icon="archive" aria-label="Archive sealed contract" disabled></md-icon-button>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="notes.txt" supporting-text="Type n to jump straight here" leading-icon="description">
<md-icon-button slot="trailing" icon="archive" aria-label="Archive notes.txt"></md-icon-button>
</md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdDivider, MdIconButton, MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList interactionMode="multi-action" label="Documents" style={{ inlineSize: '380px' }}>
<MdListItem type="button" headline="report.pdf" supportingText="Focusable — press Enter to activate" leadingIcon="picture_as_pdf">
<MdIconButton slot="trailing" icon="archive" aria-label="Archive report.pdf"></MdIconButton>
</MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="text" headline="budget.xlsx" supportingText="A text row — skipped by roving focus" leadingIcon="table_chart"></MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="Sealed contract" supportingText="Soft-disabled — still reachable, still announced" leadingIcon="lock" soft-disabled>
<MdIconButton slot="trailing" icon="archive" aria-label="Archive sealed contract" disabled></MdIconButton>
</MdListItem>
<MdDivider inset-start></MdDivider>
<MdListItem type="button" headline="notes.txt" supportingText="Type n to jump straight here" leadingIcon="description">
<MdIconButton slot="trailing" icon="archive" aria-label="Archive notes.txt"></MdIconButton>
</MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list interaction-mode="multi-action" label="Documents" style="inline-size: 380px;">
<md-list-item type="button" headline="report.pdf" supporting-text="Focusable — press Enter to activate" leading-icon="picture_as_pdf">
<md-icon-button slot="trailing" icon="archive" aria-label="Archive report.pdf"></md-icon-button>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="text" headline="budget.xlsx" supporting-text="A text row — skipped by roving focus" leading-icon="table_chart"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Sealed contract" supporting-text="Soft-disabled — still reachable, still announced" leading-icon="lock" soft-disabled>
<md-icon-button slot="trailing" icon="archive" aria-label="Archive sealed contract" disabled></md-icon-button>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="notes.txt" supporting-text="Type n to jump straight here" leading-icon="description">
<md-icon-button slot="trailing" icon="archive" aria-label="Archive notes.txt"></md-icon-button>
</md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list interaction-mode="multi-action" label="Documents" style="inline-size: 380px;">
<md-list-item type="button" headline="report.pdf" supporting-text="Focusable — press Enter to activate" leading-icon="picture_as_pdf">
<md-icon-button slot="trailing" icon="archive" aria-label="Archive report.pdf"></md-icon-button>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="text" headline="budget.xlsx" supporting-text="A text row — skipped by roving focus" leading-icon="table_chart"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Sealed contract" supporting-text="Soft-disabled — still reachable, still announced" leading-icon="lock" soft-disabled>
<md-icon-button slot="trailing" icon="archive" aria-label="Archive sealed contract" disabled></md-icon-button>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="notes.txt" supporting-text="Type n to jump straight here" leading-icon="description">
<md-icon-button slot="trailing" icon="archive" aria-label="Archive notes.txt"></md-icon-button>
</md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list interaction-mode="multi-action" label="Documents" style="inline-size: 380px;">
<md-list-item type="button" headline="report.pdf" supporting-text="Focusable — press Enter to activate" leading-icon="picture_as_pdf">
<md-icon-button slot="trailing" icon="archive" aria-label="Archive report.pdf"></md-icon-button>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="text" headline="budget.xlsx" supporting-text="A text row — skipped by roving focus" leading-icon="table_chart"></md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="Sealed contract" supporting-text="Soft-disabled — still reachable, still announced" leading-icon="lock" soft-disabled>
<md-icon-button slot="trailing" icon="archive" aria-label="Archive sealed contract" disabled></md-icon-button>
</md-list-item>
<md-divider inset-start></md-divider>
<md-list-item type="button" headline="notes.txt" supporting-text="Type n to jump straight here" leading-icon="description">
<md-icon-button slot="trailing" icon="archive" aria-label="Archive notes.txt"></md-icon-button>
</md-list-item>
</md-list>The type="text" row is the one to notice: with no selection mode on the list it
is not focusable, so arrow keys step straight past it. Give the list a
selection-mode and the same row becomes focusable, because picking from a list
of label-only rows is the whole point of a selection list.
RTL — leading and trailing sides, row padding and the drag handle all mirror
automatically under dir="rtl". Nothing on the component opts in; the same
markup is simply laid out the other way round:
<md-list label="Settings" dir="rtl"> <md-list-item headline="Wi-Fi" leading-icon="wifi" trailing-supporting-text="On"></md-list-item></md-list><!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<div style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">ltr</span>
<div dir="ltr">
<md-list label="Settings" style="max-inline-size:320px;">
<md-list-item headline="Wi-Fi" supporting-text="Home network" leading-icon="wifi" trailing-supporting-text="On"></md-list-item>
<md-list-item headline="Bluetooth" supporting-text="2 devices" leading-icon="bluetooth" trailing-supporting-text="On"></md-list-item>
</md-list>
</div>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">rtl</span>
<div dir="rtl">
<md-list label="Settings" style="max-inline-size:320px;">
<md-list-item headline="Wi-Fi" supporting-text="Home network" leading-icon="wifi" trailing-supporting-text="On"></md-list-item>
<md-list-item headline="Bluetooth" supporting-text="2 devices" leading-icon="bluetooth" trailing-supporting-text="On"></md-list-item>
</md-list>
</div>
</div>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<div style={{ display: 'grid', gridTemplateColumns: 'auto 1fr', gap: '14px 16px', alignItems: 'center' }}>
<span style={{ inlineSize: '3.5rem', opacity: '.65', fontSize: '.75rem', fontFamily: 'ui-monospace,monospace' }}>ltr</span>
<div dir="ltr">
<MdList label="Settings" style={{ maxInlineSize: '320px' }}>
<MdListItem headline="Wi-Fi" supportingText="Home network" leadingIcon="wifi" trailingSupportingText="On"></MdListItem>
<MdListItem headline="Bluetooth" supportingText="2 devices" leadingIcon="bluetooth" trailingSupportingText="On"></MdListItem>
</MdList>
</div>
<span style={{ inlineSize: '3.5rem', opacity: '.65', fontSize: '.75rem', fontFamily: 'ui-monospace,monospace' }}>rtl</span>
<div dir="rtl">
<MdList label="Settings" style={{ maxInlineSize: '320px' }}>
<MdListItem headline="Wi-Fi" supportingText="Home network" leadingIcon="wifi" trailingSupportingText="On"></MdListItem>
<MdListItem headline="Bluetooth" supportingText="2 devices" leadingIcon="bluetooth" trailingSupportingText="On"></MdListItem>
</MdList>
</div>
</div>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<div style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">ltr</span>
<div dir="ltr">
<md-list label="Settings" style="max-inline-size:320px;">
<md-list-item headline="Wi-Fi" supporting-text="Home network" leading-icon="wifi" trailing-supporting-text="On"></md-list-item>
<md-list-item headline="Bluetooth" supporting-text="2 devices" leading-icon="bluetooth" trailing-supporting-text="On"></md-list-item>
</md-list>
</div>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">rtl</span>
<div dir="rtl">
<md-list label="Settings" style="max-inline-size:320px;">
<md-list-item headline="Wi-Fi" supporting-text="Home network" leading-icon="wifi" trailing-supporting-text="On"></md-list-item>
<md-list-item headline="Bluetooth" supporting-text="2 devices" leading-icon="bluetooth" trailing-supporting-text="On"></md-list-item>
</md-list>
</div>
</div><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<div style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">ltr</span>
<div dir="ltr">
<md-list label="Settings" style="max-inline-size:320px;">
<md-list-item headline="Wi-Fi" supporting-text="Home network" leading-icon="wifi" trailing-supporting-text="On"></md-list-item>
<md-list-item headline="Bluetooth" supporting-text="2 devices" leading-icon="bluetooth" trailing-supporting-text="On"></md-list-item>
</md-list>
</div>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">rtl</span>
<div dir="rtl">
<md-list label="Settings" style="max-inline-size:320px;">
<md-list-item headline="Wi-Fi" supporting-text="Home network" leading-icon="wifi" trailing-supporting-text="On"></md-list-item>
<md-list-item headline="Bluetooth" supporting-text="2 devices" leading-icon="bluetooth" trailing-supporting-text="On"></md-list-item>
</md-list>
</div>
</div>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<div style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">ltr</span>
<div dir="ltr">
<md-list label="Settings" style="max-inline-size:320px;">
<md-list-item headline="Wi-Fi" supporting-text="Home network" leading-icon="wifi" trailing-supporting-text="On"></md-list-item>
<md-list-item headline="Bluetooth" supporting-text="2 devices" leading-icon="bluetooth" trailing-supporting-text="On"></md-list-item>
</md-list>
</div>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">rtl</span>
<div dir="rtl">
<md-list label="Settings" style="max-inline-size:320px;">
<md-list-item headline="Wi-Fi" supporting-text="Home network" leading-icon="wifi" trailing-supporting-text="On"></md-list-item>
<md-list-item headline="Bluetooth" supporting-text="2 devices" leading-icon="bluetooth" trailing-supporting-text="On"></md-list-item>
</md-list>
</div>
</div>trailing-icon is yours to swapThe layout mirrors; the glyph inside trailing-icon does not. A
chevron_right that meant “forward” in LTR still points right in RTL, where
forward is left. Both lists below are dir="rtl" and differ only in that one
attribute:
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<div style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">right</span>
<div dir="rtl">
<md-list label="جهات الاتصال — خطأ" style="max-inline-size:360px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_right"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_right"></md-list-item>
</md-list>
</div>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">left</span>
<div dir="rtl">
<md-list label="جهات الاتصال" style="max-inline-size:360px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
</md-list>
</div>
</div>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<div style={{ display: 'grid', gridTemplateColumns: 'auto 1fr', gap: '14px 16px', alignItems: 'center' }}>
<span style={{ inlineSize: '3.5rem', opacity: '.65', fontSize: '.75rem', fontFamily: 'ui-monospace,monospace' }}>right</span>
<div dir="rtl">
<MdList label="جهات الاتصال — خطأ" style={{ maxInlineSize: '360px' }}>
<MdListItem headline="آدا لوفلايس" supportingText="مهندسة" leadingIcon="person" trailingIcon="chevron_right"></MdListItem>
<MdListItem headline="آلان تورنغ" supportingText="عالم رياضيات" leadingIcon="person" trailingIcon="chevron_right"></MdListItem>
</MdList>
</div>
<span style={{ inlineSize: '3.5rem', opacity: '.65', fontSize: '.75rem', fontFamily: 'ui-monospace,monospace' }}>left</span>
<div dir="rtl">
<MdList label="جهات الاتصال" style={{ maxInlineSize: '360px' }}>
<MdListItem headline="آدا لوفلايس" supportingText="مهندسة" leadingIcon="person" trailingIcon="chevron_left"></MdListItem>
<MdListItem headline="آلان تورنغ" supportingText="عالم رياضيات" leadingIcon="person" trailingIcon="chevron_left"></MdListItem>
</MdList>
</div>
</div>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<div style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">right</span>
<div dir="rtl">
<md-list label="جهات الاتصال — خطأ" style="max-inline-size:360px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_right"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_right"></md-list-item>
</md-list>
</div>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">left</span>
<div dir="rtl">
<md-list label="جهات الاتصال" style="max-inline-size:360px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
</md-list>
</div>
</div><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<div style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">right</span>
<div dir="rtl">
<md-list label="جهات الاتصال — خطأ" style="max-inline-size:360px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_right"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_right"></md-list-item>
</md-list>
</div>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">left</span>
<div dir="rtl">
<md-list label="جهات الاتصال" style="max-inline-size:360px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
</md-list>
</div>
</div>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<div style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">right</span>
<div dir="rtl">
<md-list label="جهات الاتصال — خطأ" style="max-inline-size:360px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_right"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_right"></md-list-item>
</md-list>
</div>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">left</span>
<div dir="rtl">
<md-list label="جهات الاتصال" style="max-inline-size:360px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
</md-list>
</div>
</div>density="-1…-4" on the list drives the same --md-sys-density-scale signal a
global data-density ancestor sets, so a value here simply overrides the
inherited one — and it cascades to every row.
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<div style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">0</span>
<md-list label="Rung 0" density="0" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-1</span>
<md-list label="Rung -1" density="-1" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-2</span>
<md-list label="Rung -2" density="-2" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-3</span>
<md-list label="Rung -3" density="-3" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-4</span>
<md-list label="Rung -4" density="-4" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
</div>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<div style={{ display: 'grid', gridTemplateColumns: 'auto 1fr', gap: '14px 16px', alignItems: 'center' }}>
<span style={{ inlineSize: '3.5rem', opacity: '.65', fontSize: '.75rem', fontFamily: 'ui-monospace,monospace' }}>0</span>
<MdList label="Rung 0" density="0" style={{ inlineSize: '280px' }}>
<MdListItem headline="Ada Lovelace" supportingText="Engineer" leadingIcon="person"></MdListItem>
<MdListItem headline="Alan Turing" supportingText="Mathematician" leadingIcon="person"></MdListItem>
</MdList>
<span style={{ inlineSize: '3.5rem', opacity: '.65', fontSize: '.75rem', fontFamily: 'ui-monospace,monospace' }}>-1</span>
<MdList label="Rung -1" density="-1" style={{ inlineSize: '280px' }}>
<MdListItem headline="Ada Lovelace" supportingText="Engineer" leadingIcon="person"></MdListItem>
<MdListItem headline="Alan Turing" supportingText="Mathematician" leadingIcon="person"></MdListItem>
</MdList>
<span style={{ inlineSize: '3.5rem', opacity: '.65', fontSize: '.75rem', fontFamily: 'ui-monospace,monospace' }}>-2</span>
<MdList label="Rung -2" density="-2" style={{ inlineSize: '280px' }}>
<MdListItem headline="Ada Lovelace" supportingText="Engineer" leadingIcon="person"></MdListItem>
<MdListItem headline="Alan Turing" supportingText="Mathematician" leadingIcon="person"></MdListItem>
</MdList>
<span style={{ inlineSize: '3.5rem', opacity: '.65', fontSize: '.75rem', fontFamily: 'ui-monospace,monospace' }}>-3</span>
<MdList label="Rung -3" density="-3" style={{ inlineSize: '280px' }}>
<MdListItem headline="Ada Lovelace" supportingText="Engineer" leadingIcon="person"></MdListItem>
<MdListItem headline="Alan Turing" supportingText="Mathematician" leadingIcon="person"></MdListItem>
</MdList>
<span style={{ inlineSize: '3.5rem', opacity: '.65', fontSize: '.75rem', fontFamily: 'ui-monospace,monospace' }}>-4</span>
<MdList label="Rung -4" density="-4" style={{ inlineSize: '280px' }}>
<MdListItem headline="Ada Lovelace" supportingText="Engineer" leadingIcon="person"></MdListItem>
<MdListItem headline="Alan Turing" supportingText="Mathematician" leadingIcon="person"></MdListItem>
</MdList>
</div>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<div style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">0</span>
<md-list label="Rung 0" density="0" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-1</span>
<md-list label="Rung -1" density="-1" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-2</span>
<md-list label="Rung -2" density="-2" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-3</span>
<md-list label="Rung -3" density="-3" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-4</span>
<md-list label="Rung -4" density="-4" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
</div><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<div style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">0</span>
<md-list label="Rung 0" density="0" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-1</span>
<md-list label="Rung -1" density="-1" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-2</span>
<md-list label="Rung -2" density="-2" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-3</span>
<md-list label="Rung -3" density="-3" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-4</span>
<md-list label="Rung -4" density="-4" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
</div>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<div style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">0</span>
<md-list label="Rung 0" density="0" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-1</span>
<md-list label="Rung -1" density="-1" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-2</span>
<md-list label="Rung -2" density="-2" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-3</span>
<md-list label="Rung -3" density="-3" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-4</span>
<md-list label="Rung -4" density="-4" style="inline-size:280px;">
<md-list-item headline="Ada Lovelace" supporting-text="Engineer" leading-icon="person"></md-list-item>
<md-list-item headline="Alan Turing" supporting-text="Mathematician" leading-icon="person"></md-list-item>
</md-list>
</div>They are independent signals, so they compose. Here the wrapper is dir="rtl"
with a global data-density="-2"; the first list simply inherits that rung, and
the second declares density="-4" on itself, which wins over the inherited
value:
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<div dir="rtl" data-density="-2" style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-2</span>
<md-list label="مضغوط" style="max-inline-size:320px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-4</span>
<md-list label="مضغوط جدا" density="-4" style="max-inline-size:320px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
</md-list>
</div>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<div dir="rtl" data-density="-2" style={{ display: 'grid', gridTemplateColumns: 'auto 1fr', gap: '14px 16px', alignItems: 'center' }}>
<span style={{ inlineSize: '3.5rem', opacity: '.65', fontSize: '.75rem', fontFamily: 'ui-monospace,monospace' }}>-2</span>
<MdList label="مضغوط" style={{ maxInlineSize: '320px' }}>
<MdListItem headline="آدا لوفلايس" supportingText="مهندسة" leadingIcon="person" trailingIcon="chevron_left"></MdListItem>
<MdListItem headline="آلان تورنغ" supportingText="عالم رياضيات" leadingIcon="person" trailingIcon="chevron_left"></MdListItem>
</MdList>
<span style={{ inlineSize: '3.5rem', opacity: '.65', fontSize: '.75rem', fontFamily: 'ui-monospace,monospace' }}>-4</span>
<MdList label="مضغوط جدا" density="-4" style={{ maxInlineSize: '320px' }}>
<MdListItem headline="آدا لوفلايس" supportingText="مهندسة" leadingIcon="person" trailingIcon="chevron_left"></MdListItem>
<MdListItem headline="آلان تورنغ" supportingText="عالم رياضيات" leadingIcon="person" trailingIcon="chevron_left"></MdListItem>
</MdList>
</div>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<div dir="rtl" data-density="-2" style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-2</span>
<md-list label="مضغوط" style="max-inline-size:320px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-4</span>
<md-list label="مضغوط جدا" density="-4" style="max-inline-size:320px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
</md-list>
</div><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<div dir="rtl" data-density="-2" style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-2</span>
<md-list label="مضغوط" style="max-inline-size:320px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-4</span>
<md-list label="مضغوط جدا" density="-4" style="max-inline-size:320px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
</md-list>
</div>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<div dir="rtl" data-density="-2" style="display:grid;grid-template-columns:auto 1fr;gap:14px 16px;align-items:center">
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-2</span>
<md-list label="مضغوط" style="max-inline-size:320px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
</md-list>
<span style="inline-size:3.5rem;opacity:.65;font-size:.75rem;font-family:ui-monospace,monospace;">-4</span>
<md-list label="مضغوط جدا" density="-4" style="max-inline-size:320px;">
<md-list-item headline="آدا لوفلايس" supporting-text="مهندسة" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
<md-list-item headline="آلان تورنغ" supporting-text="عالم رياضيات" leading-icon="person" trailing-icon="chevron_left"></md-list-item>
</md-list>
</div>Density — set it on the list, not on the rows. The rung is declared on the
list’s host as --md-sys-density-scale, which every row inherits, so one
attribute keeps the whole stack in step. See Density and
RTL.
i18n — translate label and all row content. Longer translations increase
row height, and M3’s line-length guidance matters more in verbose languages —
adjust the list’s margins rather than letting lines run.
| Custom property | Purpose | Default |
|---|---|---|
--md-list-container-color | List surface | transparent for both list styles — opt in to a painted chassis |
--md-list-container-shape | List corner radius | 0 |
--md-list-padding-block / --md-list-padding-inline | List padding | 8px / 0 |
--md-list-segmented-gap | Gap between tiles in segmented style | 2px |
--md-list-drop-placeholder-color | Drag placeholder fill | primary-container at 45% |
--md-list-drop-placeholder-shape | Drag placeholder radius | corner-large (16px) |
--md-list-drop-placeholder-opacity | Drag placeholder opacity | 1 |
--md-list-drop-placeholder-outline-color / -width | Drag placeholder border | primary at 55% / 2px |
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list list-style="segmented" label="Themed list" style="inline-size: 300px; --md-list-container-color: var(--md-sys-color-surface-container-highest); --md-list-container-shape: 24px; --md-list-segmented-gap: 8px; --md-list-padding-inline: 12px; --md-list-padding-block: 12px;">
<md-list-item type="button" headline="Photos" leading-icon="photo"></md-list-item>
<md-list-item type="button" headline="Videos" leading-icon="videocam"></md-list-item>
<md-list-item type="button" headline="Music" leading-icon="music_note"></md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList listStyle="segmented" label="Themed list" style={{ inlineSize: '300px', '--md-list-container-color': 'var(--md-sys-color-surface-container-highest)', '--md-list-container-shape': '24px', '--md-list-segmented-gap': '8px', '--md-list-padding-inline': '12px', '--md-list-padding-block': '12px' }}>
<MdListItem type="button" headline="Photos" leadingIcon="photo"></MdListItem>
<MdListItem type="button" headline="Videos" leadingIcon="videocam"></MdListItem>
<MdListItem type="button" headline="Music" leadingIcon="music_note"></MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list list-style="segmented" label="Themed list" style="inline-size: 300px; --md-list-container-color: var(--md-sys-color-surface-container-highest); --md-list-container-shape: 24px; --md-list-segmented-gap: 8px; --md-list-padding-inline: 12px; --md-list-padding-block: 12px;">
<md-list-item type="button" headline="Photos" leading-icon="photo"></md-list-item>
<md-list-item type="button" headline="Videos" leading-icon="videocam"></md-list-item>
<md-list-item type="button" headline="Music" leading-icon="music_note"></md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list list-style="segmented" label="Themed list" style="inline-size: 300px; --md-list-container-color: var(--md-sys-color-surface-container-highest); --md-list-container-shape: 24px; --md-list-segmented-gap: 8px; --md-list-padding-inline: 12px; --md-list-padding-block: 12px;">
<md-list-item type="button" headline="Photos" leading-icon="photo"></md-list-item>
<md-list-item type="button" headline="Videos" leading-icon="videocam"></md-list-item>
<md-list-item type="button" headline="Music" leading-icon="music_note"></md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list list-style="segmented" label="Themed list" style="inline-size: 300px; --md-list-container-color: var(--md-sys-color-surface-container-highest); --md-list-container-shape: 24px; --md-list-segmented-gap: 8px; --md-list-padding-inline: 12px; --md-list-padding-block: 12px;">
<md-list-item type="button" headline="Photos" leading-icon="photo"></md-list-item>
<md-list-item type="button" headline="Videos" leading-icon="videocam"></md-list-item>
<md-list-item type="button" headline="Music" leading-icon="music_note"></md-list-item>
</md-list>A segmented list zeroes both paddings by default, because its tiles are
meant to float directly on the page surface with no container behind them. The
moment you tint one with --md-list-container-color, set
--md-list-padding-block and --md-list-padding-inline yourself —
otherwise the rows sit flush against the container edges, which reads as a
rendering bug rather than a design.
Check any override in both themes before you ship it.
Row appearance is driven by the --md-list-item-* properties. The full set is
in the row API reference; these are the ones reached
for most, and all of them can be set on the list, because the rows inherit
them:
| Custom property | Purpose |
|---|---|
--md-list-item-container-color / --md-list-item-container-shape | Row surface |
--md-list-item-container-shape-start-start … -end-end | Per-corner radii |
--md-list-item-active-container-shape, or -hover- / -focus- / -pressed- / -selected- / -dragged- individually | Per-state shape |
--md-list-item-hover-state-layer-opacity / -focus- / -pressed- | State layer |
--md-list-item-expand-duration / --md-list-item-collapse-duration | Expandable motion |
The per-corner properties are how you round the ends of a group. They have to go on the individual rows, not on the list: a value set on the list is inherited by every row equally, so it cannot single out the first and the last.
<!-- index.html <head> — the icon font the components draw from -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap">
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<md-list label="Rounded group ends" style="inline-size: 300px; --md-list-item-container-color: var(--md-sys-color-surface-container-high);">
<md-list-item type="button" headline="First" leading-icon="photo" style="--md-list-item-container-shape-start-start: 20px; --md-list-item-container-shape-start-end: 20px;"></md-list-item>
<md-list-item type="button" headline="Middle" leading-icon="videocam"></md-list-item>
<md-list-item type="button" headline="Last" leading-icon="music_note" style="--md-list-item-container-shape-end-start: 20px; --md-list-item-container-shape-end-end: 20px;"></md-list-item>
</md-list>// Icons need the Material Symbols stylesheet in index.html — see Installation.
import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<MdList label="Rounded group ends" style={{ inlineSize: '300px', '--md-list-item-container-color': 'var(--md-sys-color-surface-container-high)' }}>
<MdListItem type="button" headline="First" leadingIcon="photo" style={{ '--md-list-item-container-shape-start-start': '20px', '--md-list-item-container-shape-start-end': '20px' }}></MdListItem>
<MdListItem type="button" headline="Middle" leadingIcon="videocam"></MdListItem>
<MdListItem type="button" headline="Last" leadingIcon="music_note" style={{ '--md-list-item-container-shape-end-start': '20px', '--md-list-item-container-shape-end-end': '20px' }}></MdListItem>
</MdList>
</>
);
}// Icons need the Material Symbols stylesheet in index.html — see Installation.
// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<md-list label="Rounded group ends" style="inline-size: 300px; --md-list-item-container-color: var(--md-sys-color-surface-container-high);">
<md-list-item type="button" headline="First" leading-icon="photo" style="--md-list-item-container-shape-start-start: 20px; --md-list-item-container-shape-start-end: 20px;"></md-list-item>
<md-list-item type="button" headline="Middle" leading-icon="videocam"></md-list-item>
<md-list-item type="button" headline="Last" leading-icon="music_note" style="--md-list-item-container-shape-end-start: 20px; --md-list-item-container-shape-end-end: 20px;"></md-list-item>
</md-list><script setup>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<template>
<md-list label="Rounded group ends" style="inline-size: 300px; --md-list-item-container-color: var(--md-sys-color-surface-container-high);">
<md-list-item type="button" headline="First" leading-icon="photo" style="--md-list-item-container-shape-start-start: 20px; --md-list-item-container-shape-start-end: 20px;"></md-list-item>
<md-list-item type="button" headline="Middle" leading-icon="videocam"></md-list-item>
<md-list-item type="button" headline="Last" leading-icon="music_note" style="--md-list-item-container-shape-end-start: 20px; --md-list-item-container-shape-end-end: 20px;"></md-list-item>
</md-list>
</template><script>
// Icons need the Material Symbols stylesheet in index.html — see Installation.
import '@awc-ui/core/define';
</script>
<md-list label="Rounded group ends" style="inline-size: 300px; --md-list-item-container-color: var(--md-sys-color-surface-container-high);">
<md-list-item type="button" headline="First" leading-icon="photo" style="--md-list-item-container-shape-start-start: 20px; --md-list-item-container-shape-start-end: 20px;"></md-list-item>
<md-list-item type="button" headline="Middle" leading-icon="videocam"></md-list-item>
<md-list-item type="button" headline="Last" leading-icon="music_note" style="--md-list-item-container-shape-end-start: 20px; --md-list-item-container-shape-end-end: 20px;"></md-list-item>
</md-list>CSS part — drop-placeholder, the ghost slot shown while a row is dragged
(the same affordance md-accordion uses).
<!-- index.html — register the AWC UI elements once -->
<script type="module">
import '@awc-ui/core/define';
</script>
<style>
.list-parts::part(drop-placeholder) {
border-style: solid;
border-width: 3px;
border-color: var(--md-sys-color-tertiary);
background: color-mix(in srgb, var(--md-sys-color-tertiary) 20%, transparent);
}
</style>
<md-list class="list-parts" label="Styled drop target" reorderable style="inline-size: 300px;">
<md-list-item headline="Drag me" supporting-text="The ghost slot is restyled"></md-list-item>
<md-list-item headline="Second row"></md-list-item>
<md-list-item headline="Third row"></md-list-item>
</md-list>import { MdList, MdListItem } from '@awc-ui/react';
export function Demo() {
return (
<>
<style>
.list-parts::part(drop-placeholder) {
border-style: solid;
border-width: 3px;
border-color: var(--md-sys-color-tertiary);
background: color-mix(in srgb, var(--md-sys-color-tertiary) 20%, transparent);
}
</style>
<MdList className="list-parts" label="Styled drop target" reorderable style={{ inlineSize: '300px' }}>
<MdListItem headline="Drag me" supportingText="The ghost slot is restyled"></MdListItem>
<MdListItem headline="Second row"></MdListItem>
<MdListItem headline="Third row"></MdListItem>
</MdList>
</>
);
}// app.module.ts — register the AWC UI elements once
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { AwcUiModule } from '@awc-ui/angular';
@NgModule({
imports: [AwcUiModule],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
<!-- app.component.html -->
<style>
.list-parts::part(drop-placeholder) {
border-style: solid;
border-width: 3px;
border-color: var(--md-sys-color-tertiary);
background: color-mix(in srgb, var(--md-sys-color-tertiary) 20%, transparent);
}
</style>
<md-list class="list-parts" label="Styled drop target" reorderable style="inline-size: 300px;">
<md-list-item headline="Drag me" supporting-text="The ghost slot is restyled"></md-list-item>
<md-list-item headline="Second row"></md-list-item>
<md-list-item headline="Third row"></md-list-item>
</md-list><script setup>
import '@awc-ui/core/define';
</script>
<template>
<style>
.list-parts::part(drop-placeholder) {
border-style: solid;
border-width: 3px;
border-color: var(--md-sys-color-tertiary);
background: color-mix(in srgb, var(--md-sys-color-tertiary) 20%, transparent);
}
</style>
<md-list class="list-parts" label="Styled drop target" reorderable style="inline-size: 300px;">
<md-list-item headline="Drag me" supporting-text="The ghost slot is restyled"></md-list-item>
<md-list-item headline="Second row"></md-list-item>
<md-list-item headline="Third row"></md-list-item>
</md-list>
</template><script>
import '@awc-ui/core/define';
</script>
<style>
.list-parts::part(drop-placeholder) {
border-style: solid;
border-width: 3px;
border-color: var(--md-sys-color-tertiary);
background: color-mix(in srgb, var(--md-sys-color-tertiary) 20%, transparent);
}
</style>
<md-list class="list-parts" label="Styled drop target" reorderable style="inline-size: 300px;">
<md-list-item headline="Drag me" supporting-text="The ghost slot is restyled"></md-list-item>
<md-list-item headline="Second row"></md-list-item>
<md-list-item headline="Third row"></md-list-item>
</md-list>md-table ·
md-card ·
md-menu ·
md-accordion ·
md-transfer-list ·
md-divider
md-listTwo artefacts to give your AI agent so it generates correct UI with this component. The per-component spec answers "how do I use this exact tag?". The main-llm spec answers "which tag should I pick in the first place?".
md-list spec card
Identity · when to use / when NOT · decision cues · behavioural contract · do/don't · anti-patterns · full API. Paste into your agent when you're implementing with this component.
System-prompt preamble · decision matrix · token reference · page recipes · anti-patterns. Paste into the system prompt at the start of a piece of work.