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

Bar List

Labelled horizontal bars with their values, ranked.

ComponentsBar List
datastatic
<arc-bar-list>

Overview

BarList shows "which of these, and by how much" in less room than a chart: one row per item, a label and a value above a bar whose length is the value's share of the largest. It suits a top-N breakdown in a tile, a card or a sidebar, where `arc-chart` is dashboard-sized and `arc-sparkline` has no labels. Rows are ranked largest first unless you set `unsorted`, and `limit` keeps the top few. Set `max` to put several lists on one scale. The list is a real ordered list: each row reads as its label and value, and the bar is decoration hidden from assistive tech, so nothing depends on seeing its length.

Guidelines

When to use

  • Give the list a `label` naming what is being compared
  • Use `display` for formatted numbers ("1.2k", "38%") and keep `value` numeric for the bar
  • Use `limit` and a "see all" link rather than a long list in a small tile

When not to use

  • Do not use it for values that can be negative; a diverging arc-meter shows a lean either way
  • Do not rely on bar length alone to carry the number; keep the value visible

Features

  • Ranked by value, largest first, or in the given order with `unsorted`
  • `limit` for a top-N view, and `max` to share one scale across lists
  • Per-row `display` text for formatted values, rendered identically on server and client
  • Rows can link (`href`), and the fill colour comes from `--bar-list-fill`
  • An ordered list with a label per row: accessible without seeing the bars

Preview

Usage

<arc-bar-list label="Traffic sources"></arc-bar-list>

<script>
  document.querySelector('arc-bar-list').items = [{ label: "Search", value: 482 }, { label: "Direct", value: 311 }, { label: "Social", value: 97 }];
</script>

API

unitstring''
Text appended to each value, such as "%" or " ms".
labelstring''
Accessible name for the list, announced before its rows.
itemsArray[]
The rows, as { label, value, display?, href?, highlight? } objects. highlight: true emphasises a row: its bar takes --bar-list-highlight and its label is set in bold, so the emphasis is not carried by colour alone. Set from script, a framework binding, or a JSON attribute. Rows whose value is not a finite number are dropped. display is the text shown for the value (e.g. "1.2k"); without it the number is shown as is, so server and client render the same text in any locale. With href, a row's label is a link.
maxnumber0
The value a full bar stands for. Defaults to the largest value, so the top row always fills the track. Set it to compare several lists on one scale.
limitnumber0
Show at most this many rows, after sorting. Unset shows all. The rows left out are counted in a closing "N more" line, which the more slot replaces.
referencenumber0
A value to mark on every track with a dashed line, such as chance level, a target or a baseline. On the same scale as the bars.
reference-labelstring
What the reference line is. Shown with its value beneath the list, so the marker reads as text as well as a position.
reference-displaystring
The text shown for the reference's value in that caption (e.g. "6%"), as display is for a row. Without it the number is shown as is, with unit.
unsortedbooleanfalse
Keep the order the items were given in. By default rows are ranked, largest first.

See Also