Appearance
Search Web Components
Search Web Components builds a search page out of web components: a keyword field, facets, sorting, results, a pager, and more. The components search a Search API Decoupled endpoint from the browser. Results, facets, and pages change without a page refresh, and the page needs no View and no Ajax.
In Drupal, place the components with Layout Builder, Drupal Canvas, or Twig. Outside Drupal, the npm package drupal-search-web-components provides the same components, to search a Search API Decoupled endpoint from anywhere or another API with request hooks.
Where to start
- Build a search: set up a search page in Drupal, from the endpoint to the components on the page.
- Develop: install the npm package and extend the components.
See the components
The Storybook demonstrates every component:
- Start here: one search page and a tour of what Storybook holds.
- Search pages: full search pages where each component can be turned off and on.