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

Search

A search field with an optional dropdown of suggestions that you supply.

ComponentsSearch
inputinteractive
<arc-search>

Overview

Search is a text field for search and filtering. It has a magnifying glass icon at the start, a clear button that shows once there's text, and a spinner that takes the clear button's place while `loading` is set. A `label` renders above the field. Without one, the `placeholder` becomes the accessible name. Typing fires `arc-input` on every keystroke. Enter fires `arc-change` to submit. The clear button empties the field, fires `arc-clear` and puts focus back in the field. Add `<arc-suggestion>` children for a dropdown of suggestions. Each one's `value` is what you get back, and its text is the label. The dropdown opens on focus or typing, ArrowUp and ArrowDown move through it, Enter picks the highlighted one, and Escape or a click outside closes it. Picking one fills the field with its label and fires `arc-select` with `{ value: { label, value } }`, then `arc-change`. Search doesn't filter the list as you type. To narrow it, replace the children from your `arc-input` handler. The field is a `searchbox`. With suggestions it becomes a `combobox` with `aria-expanded`, wired to a `listbox` of `option`s.

Guidelines

Do

  • Give it a `label`. Hide it with `::part(label)` if the design has no room for it
  • Use `placeholder` to say what can be searched, for example "Search components..."
  • Set `loading` while results are being fetched
  • Debounce your `arc-input` handler for live search, and use `arc-change` for an explicit submit

Don't

  • Don't use it for ordinary text fields. Use Input or Textarea
  • Don't show hundreds of suggestions. Keep the list to 8 to 10
  • Don't set `loading` when nothing is being fetched

Features

  • The dropdown renders in the top layer, so a parent with `overflow: hidden` doesn't clip it
  • `open` reflects whether the dropdown is showing, and you can set it yourself

Preview

Button Modal Table Tabs

Usage

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

<arc-search label="Search" placeholder="Search docs...">
  <arc-suggestion value="getting-started">Getting Started</arc-suggestion>
  <arc-suggestion value="components">Components</arc-suggestion>
</arc-search>

API

valuestring''
Current text content of the search input.
placeholderstring'Search...'
Hint text displayed when the input is empty.
labelstring''
Accessible label for the search field. Rendered visually above the input when provided.
disabledbooleanfalse
Disables the input, reducing opacity and blocking interaction.
loadingbooleanfalse
Shows a spinning indicator in place of the clear button to signal in-progress loading.
openbooleanfalse
Whether the suggestion dropdown is visible. Reflected so it can be opened programmatically or styled from CSS.

Events

arc-inputdetail:{ value: string }
Fired on each keystroke in the search field
arc-clear
Fired when the clear button is clicked
arc-changedetail:{ value: string }
Fired when the value is committed: Enter in the field, or a suggestion selected by click or keyboard
arc-select
Fired when a suggestion is selected (before the accompanying arc-change)

Suggestion

<arc-suggestion>

One suggestion in a Search dropdown. `value` is what the events report, and the text is the label.

label
valuestring''
Suggestion value

See also