eds-global-search

Explore the Interactive Component

Use the playground below to experiment with the component. Click the button to view the full Storybook deployment for additional examples and configurations.

See It in Use with Code

Check out this practical implementation of component.

In Plain HTML

Properties

PropertyAttributeDescriptionTypeDefault
apiEndpointapi-endpointAPI endpoint for searchstring'/api/v1/global-search'
authTokenauth-tokenOptional authorization token (JWT) to include in requests When provided, will be sent as “Bearer ” in Authorization headerstring''
currentOrigincurrent-originCurrent site origin (auto-detected if not provided)string''
currentSourcecurrent-sourceCurrent source identifier (e.g., ‘handbook’, ‘design’) Results matching this source will open in same tabstring''
debounceDelaydebounce-delayDebounce delay in millisecondsnumber300
forceNewTabforce-new-tabForce all results to open in new tab (useful when embedded in external sites)booleanfalse
limitlimitMaximum number of results to fetchnumber20
placeholderplaceholderPlaceholder text for the inputstring'Search Handbook + Design...'

Events

EventDescriptionType
resultSelectedEmitted when a result is selectedCustomEvent<{ id: string; title: string; url: string; section: string; tags: string[]; date: string; source: string; snippet: string; score: number; }>
searchClosedEmitted when search is closed (for expandable mode)CustomEvent<void>

Dependencies

Depends on

Graph

graph TD;
  eds-global-search --> eds-input-field
  eds-global-search --> eds-spinner
  eds-global-search --> eds-icon-wrapper
  eds-input-field --> eds-input-label
  eds-input-field --> eds-input
  eds-input-field --> eds-input-select
  eds-input-field --> eds-input-file
  eds-input-field --> eds-input-dropzone
  eds-input-field --> eds-input-search
  eds-input-field --> eds-input-range
  eds-input-field --> eds-input-footer
  eds-input --> eds-icon-wrapper
  eds-input-select --> eds-icon-wrapper
  eds-input-search --> eds-icon-wrapper
  eds-input-footer --> eds-icon-wrapper
  eds-input-footer --> eds-link
  eds-link --> eds-icon-wrapper
  style eds-global-search fill:#f9f,stroke:#333,stroke-width:4px

Built with StencilJS