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...'
variantvariantVisual theme of the search pill. - “gray” (default): light grey surface (matches the EBRAINS header mockup) - “white”: white surface with a 1px border (use when sitting on a coloured nav) - “black”: brand-black surface with white text (use on dark backgrounds)"black" | "gray" | "white"'gray'

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-spinner
  eds-global-search --> eds-icon-wrapper
  style eds-global-search fill:#f9f,stroke:#333,stroke-width:4px

Built with StencilJS