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

Search input with a magnifying glass icon, clear button, loading spinner, and autocomplete suggestions dropdown.

ComponentsSearch
inputinteractive
<arc-search>

Overview

Search is an input for search and filter interactions. It wraps a text input with a leading magnifying glass icon, an optional clear button, and a loading spinner that can be toggled while results are being fetched. When `<arc-suggestion>` child elements are provided, the component displays a dropdown of autocomplete suggestions that the user can navigate with the keyboard or mouse. The component fires three events: `arc-input` on every keystroke for live filtering, `arc-change` when the user presses Enter to submit, and `arc-select` when a suggestion is chosen. The clear button (visible when the input has content) resets the field and dispatches `arc-clear`, then returns focus to the input so the user can keep editing. Suggestions are provided declaratively with `<arc-suggestion>` elements, each carrying a `value` and a visible label. The dropdown opens on focus when suggestions exist and supports ArrowUp/ArrowDown navigation, Enter to select, and Escape to dismiss. The search input uses `role="searchbox"` and connects to the suggestion listbox with ARIA attributes for screen readers.

Guidelines

When to use

  • Provide a `label` for accessibility even if you visually hide it with CSS
  • Use `placeholder` to describe what the user can search for, e.g. "Search components..."
  • Set `loading` to true while fetching results to give the user visual feedback
  • Provide `<arc-suggestion>` elements for common or recent queries to speed up discovery
  • Listen to `arc-input` for debounced live search, and `arc-change` for explicit submission

When not to use

  • Do not use Search for generic text input; use Input or Textarea for non-search fields
  • Do not populate suggestions with hundreds of items; keep the list to 8-10 for usability
  • Do not rely solely on the clear button for resetting: also handle programmatic value clearing
  • Do not use `loading` without actually fetching data: it misleads users about system activity
  • Avoid placing Search inside a container with `overflow: hidden` that would clip the suggestion dropdown

Features

  • Built-in magnifying glass search icon positioned inside the input field
  • Clear button that appears when the input has a value, with `arc-clear` event on click
  • Loading spinner toggled via the `loading` prop, replacing the clear button while active
  • Autocomplete suggestions dropdown via `<arc-suggestion>` child elements
  • Full keyboard navigation: ArrowUp/Down through suggestions, Enter to select or submit, Escape to close
  • Three event types: `arc-input` (keystrokes), `arc-change` (submit), `arc-select` (suggestion picked)
  • Automatic outside-click dismissal of the suggestion dropdown
  • Accessible `role="searchbox"` with `aria-expanded` and `role="listbox"` for suggestions

Preview

Button Modal Table Tabs

Usage

This component requires JavaScript. No pure HTML/CSS version is available. Use the Web Component directly 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>

Autocomplete suggestion item inside a Search component.

label
valuestring''
Suggestion value

See Also