Getting startedComponentsDesign tokensThemingTheme synthesizerFrameworksAccessibilityUtilitiesServer renderingBrowser supportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting startedFrameworksServer renderingDesign tokensThemingTheme synthesizerTypographyUtilitiesAll componentsAccessibilityBrowser supportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

List

A vertical list of arc-list-item rows that can also work as a single- or multi-select listbox.

ComponentsList
datainteractive
<arc-list>

Overview

List holds a column of `<arc-list-item>` rows. Arrow Up and Down move between rows and wrap at the ends, and Home and End jump to the first and last. Set `selectable` and the list becomes a `role="listbox"` that manages `aria-selected` on its items. Add `multiple` for multi-select, which also sets `aria-multiselectable`. The selection is a `value` string, comma-separated in multi-select, and `arc-change` fires on each change with the new value in `event.detail.value`. Without `selectable`, the list is a plain `role="list"`. `variant` is default (plain), bordered (an outlined container) or separated (a bottom border between items). `size` (sm, md, lg) scales each row's text, padding and height.

Guidelines

Do

  • Use arc-list-item as direct children
  • Put per-row buttons (rename, delete) in the `actions` slot of a plain list, and give each one a label naming its row: "Rename Weekly review", not "Rename"
  • Mark the current row of a list with actions using `href` and `selected`, which sets aria-current. A selectable list is a listbox and can't hold row actions
  • Set `selectable` when the rows are choices to pick from
  • Use the bordered variant inside cards or panels
  • Use the separated variant for long lists, where a line between rows makes them easier to scan

Don't

  • Don't use List for navigation menus. Use Navigation Menu or Dropdown Menu
  • Don't mix arc-list-item with other elements inside a selectable list
  • Don't nest lists more than one level deep. Use a tree view for hierarchical data

Features

  • Enter and Space select the focused row in a selectable list
  • Row actions: an `actions` slot on arc-list-item, shown on hover or focus (always shown on devices without hover). Clicking an action never selects the row

Preview

Inbox Drafts Sent Trash Weekly review Roadmap

Usage

This component needs JavaScript. Use the Web Component or a framework wrapper.

<arc-list variant="bordered" selectable>
  <arc-list-item value="inbox">
    <arc-icon slot="prefix" name="inbox"></arc-icon>
    Inbox
    <arc-badge slot="suffix" variant="primary">12</arc-badge>
  </arc-list-item>
  <arc-list-item value="drafts">
    <arc-icon slot="prefix" name="file-text"></arc-icon>
    Drafts
  </arc-list-item>
  <arc-list-item value="sent">
    <arc-icon slot="prefix" name="send"></arc-icon>
    Sent
  </arc-list-item>
</arc-list>

API

valuestring''
The currently selected value(s). Comma-separated when multiple is true. The selection itself is held as a list of values, so a value containing a comma is selected and rendered correctly; only the *serialised* multi-select string cannot represent one, since the comma is its separator. Single-select is exact for any value.
labelstring''
Accessible name for the list, applied as aria-label. Required when selectable is set so the listbox has an accessible name.
variant'default' | 'bordered' | 'separated''default'
Visual style. Bordered wraps the list in an outlined container. Separated adds bottom borders between items.
size'sm' | 'md' | 'lg''md'
Scale of the list's rows: their text, padding and height. sm is a dense list such as a sidebar; its rows keep the touch-target minimum (larger on touch screens).
selectablebooleanfalse
Enables selection mode. Sets role="listbox" and manages aria-selected on child items.
multiplebooleanfalse
Allows multiple items to be selected simultaneously. Only applies when selectable is true.

Events

arc-selectdetail:{ value: string }
Fired from the activated arc-list-item when a selectable list is driven by Enter or Space.
arc-changedetail:{ value: string }
Fired when the selection changes. event.detail.value contains the new value string.

List Item

<arc-list-item>

One row of an arc-list, optionally a link, with slots for secondary text and row actions.

valuestring''
Unique identifier used for selection tracking.
hrefstring''
When set, renders the item as an anchor tag for navigation.
selectedbooleanfalse
Whether this item is currently selected. Managed automatically by a selectable parent list. On an href item in a plain list it marks the current page instead (aria-current="page"), which is the accessible way to show the current row in a list whose rows carry actions.
disabledbooleanfalse
Prevents interaction and dims the item.

Events

arc-selectdetail:{ value: string }
Fired when the item is activated: by click, or by Enter or Space on a focused row (in a selectable list the parent dispatches it from this element). Cancelable: on an href row, cancelling it stops the link navigating, which is how a single-page app routes the click itself. A modified click (Ctrl, Cmd, Shift, a middle click) is left to the browser and does not fire it.

See also