{"id":30056411,"url":"https://github.com/10up/elasticpress-react","last_synced_at":"2025-08-07T22:59:30.161Z","repository":{"id":39622780,"uuid":"281745137","full_name":"10up/elasticpress-react","owner":"10up","description":"Use ElasticPress with React.","archived":false,"fork":false,"pushed_at":"2024-04-25T00:36:08.000Z","size":3133,"stargazers_count":31,"open_issues_count":17,"forks_count":3,"subscribers_count":55,"default_branch":"develop","last_synced_at":"2025-07-17T13:03:15.315Z","etag":null,"topics":["elasticpress","elasticsearch","react","wordpress"],"latest_commit_sha":null,"homepage":"https://elasticpress.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/10up.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-22T17:46:26.000Z","updated_at":"2025-04-07T16:57:33.000Z","dependencies_parsed_at":"2024-02-01T22:08:47.138Z","dependency_job_id":"be7b98aa-ae43-4338-ab61-f49e35954f39","html_url":"https://github.com/10up/elasticpress-react","commit_stats":{"total_commits":88,"total_committers":6,"mean_commits":"14.666666666666666","dds":0.5454545454545454,"last_synced_commit":"bb908c23b090d4b6153c9e5e334c794ab8177ebf"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/10up/elasticpress-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10up%2Felasticpress-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10up%2Felasticpress-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10up%2Felasticpress-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10up%2Felasticpress-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/10up","download_url":"https://codeload.github.com/10up/elasticpress-react/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10up%2Felasticpress-react/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269338063,"owners_count":24400179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elasticpress","elasticsearch","react","wordpress"],"created_at":"2025-08-07T22:59:19.874Z","updated_at":"2025-08-07T22:59:30.131Z","avatar_url":"https://github.com/10up.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ElasticPress React\n\n\u003e ElasticPress React is a library of React components to supercharge your headless WordPress website with ElasticPress.\n\n[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/elasticpress-react.svg)](https://github.com/10up/elasticpress-react/releases/latest) [![GPLv2 License](https://img.shields.io/github/license/10up/elasticpress-react.svg)](https://github.com/10up/elasticpress-react/blob/develop/LICENSE.md)\n\n## Requirements\n\n* Elasticsearch per [ElasticPress requirements](https://github.com/10up/ElasticPress#requirements).\n* WordPress website running [ElasticPress](https://elasticpress.io).\n\n## Installation\n\nTo install ElasticPress React, simply install via npm:\n\n```\nnpm install @10up/elasticpress-react --save\n```\n\nYou will need an Elasticsearch instance and a WordPress website running [ElasticPress](https://elasticpress.io).\n\n## Components\n\n### ElasticPressProvider\nYou must wrap your application with `ElasticPressProvider` in order to use the ElasticPress components.\n\n```js\n\t\u003cElasticPressProvider\n\t\tnode=\"http://elasticpress.test/__elasticsearch\"\n\t\tindexName=\"elasticpresstest-post-1\"\n\t\u003e\n\t\t{/* ElasticPress Components */}\n\t\u003c/ElasticPressProvider\u003e\n```\n\n### Autosuggest\n\nThis component outputs a search field that when typed in will autosuggest results to the user.\n\n```js\nimport { AutosuggestField } from '@10up/elasticpress-react';\n\nconst MyComponent = () =\u003e (\n\t\u003c\u003e\n\t\t\u003cp\u003eHere is my fancy new component.\u003c/p\u003e\n\n\t\t\u003cp\u003eHere's a search input with autosuggest:\u003c/p\u003e\n\n\t\t\u003cElasticPressProvider\n\t\t\t\tnode=\"http://elasticpress.test/__elasticsearch\"\n\t\t\t\tindexName=\"elasticpresstest-post-1\"\n\t\t\t\tloadInitialData={false}\n\t\t\t\u003e\n\t\t\t\t\u003cAutosuggestField /\u003e\n\t\t\t\u003c/ElasticPressProvider\u003e\n\t\u003c/\u003e\n);\n```\n\n#### Screenshot\n\n![Autosuggest screenshot](https://github.com/10up/elasticpress-react/raw/develop/screenshots/autosuggest.jpg)\n\n### Related Content\n\nThis component outputs content related to a post.\n\n```js\nimport { RelatedContent } from '@10up/elasticpress-react';\n\nconst MyComponent = () =\u003e (\n\t\u003c\u003e\n\t\t\u003cp\u003eHere is my fancy new component.\u003c/p\u003e\n\n\t\t\u003cp\u003eHere is some related content to post 5:\u003c/p\u003e\n\n\t\t\u003cRelatedContent\n\t\t\twpApiRoot=\"https://mysite.com/wp-json\"\n\t\t\tpostId=\"5\"\n\t\t/\u003e\n\t\u003c/\u003e\n);\n```\n\n### Search and Post Results\n\n```js\nimport { PostContextProvider, SearchField, Posts } from '@10up/elasticpress-react';\n\nconst MyComponent = () =\u003e {\n\t// Make sure to wrap your components with the provider.\n\treturn (\n\t\t\u003cElasticPressProvider\n\t\t\tnode=\"http://elasticpress.test/__elasticsearch\"\n\t\t\tindexName=\"elasticpresstest-post-1\"\n\t\t\u003e\n\t\t\t\u003cdiv\u003e\n\t\t\t\t\u003cSearchField /\u003e\n\t\t\t\u003c/div\u003e\n\n\t\t\t\u003cdiv\u003e\n\t\t\t\t\u003cPosts /\u003e\n\t\t\t\u003c/div\u003e\n\t\t\u003c/ElasticPressProvider\u003e\n\t);\n};\n```\n\n#### Screenshot\n![Posts screenshot](https://github.com/10up/elasticpress-react/raw/develop/screenshots/posts.jpg)\n\n## Support Level\n\n**Active:** 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress.  Bug reports, feature requests, questions, and pull requests are welcome.\n\n## Changelog\n\nA complete listing of all notable changes to ElasticPress React components are documented in [CHANGELOG.md](https://github.com/10up/elasticpress-react/blob/develop/CHANGELOG.md).\n\n## Contributing\n\nPlease read [CODE_OF_CONDUCT.md](https://github.com/10up/elasticpress-react/blob/develop/CODE_OF_CONDUCT.md) for details on our code of conduct, [CONTRIBUTING.md](https://github.com/10up/elasticpress-react/blob/develop/CONTRIBUTING.md) for details on the process for submitting pull requests to us, and [CREDITS.md](https://github.com/10up/elasticpress-react/blob/develop/CREDITS.md) for a listing of maintainers of, contributors to, and libraries used by ElasticPress React components.\n\n## Like what you see?\n\n\u003ca href=\"http://10up.com/contact/\"\u003e\u003cimg src=\"https://10up.com/uploads/2016/10/10up-Github-Banner.png\" width=\"850\" alt=\"Work with us at 10up\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10up%2Felasticpress-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F10up%2Felasticpress-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10up%2Felasticpress-react/lists"}