# @yext/answers-react-components

Latest version **0.2.0-beta.184** (published 2022-06-17) · 0 weekly downloads

## Install

```sh
npm install @yext/answers-react-components
pnpm add @yext/answers-react-components
yarn add @yext/answers-react-components
bun add @yext/answers-react-components
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.0-beta.184 |
| Published | 2022-06-17 |
| First published | 2022-02-10 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 13 |
| Unpacked size | 1.4 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 11 |
| Author | slapshot@yext.com |
| Maintainers | twhiteyext, ewu42, bryanreed, dlsgusrn7577, klu, paigep, stellali, petya182, ptroupgalligan, kowusumensah, aparnagh, syhanley, andyluu, zhengzhi, icapistrano_, mdavis-yext, jimboh, jballschneider, jknutsonn, jamesyang14, jfromm, tobyko, lymarrie, levyshi9945, mkilpatrick, baigel1, koyoldc, nricartsanchez, roser11, dkang3021, xlin97, mleifer, pmomesso, eefi, mxs2019, jaredhood, nmanu, jrhoads, npark, lki9419, mancusi, rchhatre, mtusman, mdavish, apavlick, yext_eng_npm, benmcginnis, kunal-p, data-enabler, tmeyer2115, mbowman, jronkin_yext, oshi, svc_jenkins_consulting_yext, cblair_yext, mpittinsky, jtufts, eercelebi, afitzgeraldyext, mwoon, alex_ginsberg, cxchen, willgorick, bhaines-yext, aliang_yext, inemzer, zgeier, sgresh_yext, rconsalo, stephenrva, jbaik, sjayakumar, tritpham, hoosred, ttimblin, sharvey, jameshu01, dwuyext, wenright-yext, npatel94, johnnguyen, zgu, telliottyext, johncho92, jpjamipark, tconnolly, canderson_yext, hgaertner, gweiler, ssaunders, sukim, rpope, eal172, peteros, jachen1997, jesuyed, ytruong, joshuahsueh |

## Links

- npm: https://www.npmjs.com/package/@yext/answers-react-components
- Repository: https://github.com/yext/answers-react-components
- Homepage: https://github.com/yext/answers-react-components#readme
- Issues: https://github.com/yext/answers-react-components/issues
- npm.io page: https://npm.io/package/@yext/answers-react-components

## Dependencies (13)

- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [classnames](https://npm.io/package/classnames.md) ^2.3.1
- [prop-types](https://npm.io/package/prop-types.md) ^15.8.1
- [@restart/ui](https://npm.io/package/@restart/ui.md) ^1.0.1
- [@restart/hooks](https://npm.io/package/@restart/hooks.md) ^0.4.5
- [tailwind-merge](https://npm.io/package/tailwind-merge.md) ^1.3.0
- [@yext/analytics](https://npm.io/package/@yext/analytics.md) ^0.2.0-beta.3
- [react-collapsed](https://npm.io/package/react-collapsed.md) ^3.3.0
- [recent-searches](https://npm.io/package/recent-searches.md) ^1.0.5
- [@tailwindcss/forms](https://npm.io/package/@tailwindcss/forms.md) ^0.5.0
- [@microsoft/api-extractor](https://npm.io/package/@microsoft/api-extractor.md) ^7.19.4
- [@microsoft/api-documenter](https://npm.io/package/@microsoft/api-documenter.md) ^7.15.3
- [use-isomorphic-layout-effect](https://npm.io/package/use-isomorphic-layout-effect.md) ^1.1.2

## Recent versions

- 0.2.0-beta.184 (latest) — 2022-06-17
- 0.1.2-alpha.161 (alpha) — 2022-05-26
- 0.1.0-beta.6 (beta) — 2022-02-22
- 0.1.1-beta.8 — 2022-05-05
- 0.1.1-alpha.12 — 2022-04-29
- 0.1.1-alpha.11 — 2022-04-29
- 0.1.1-alpha.10 — 2022-04-29
- 0.1.1-alpha.9 — 2022-04-27
- 0.1.1-alpha.8 — 2022-04-27
- 0.1.1-alpha.7 — 2022-04-26
- 0.1.1-alpha.6 — 2022-04-25
- 0.1.1-alpha.5 — 2022-04-20
- 0.1.1-alpha.4 — 2022-04-20
- 0.1.1-alpha.3 — 2022-04-20
- 0.1.1-alpha.1 — 2022-04-19
- … 19 more at https://npm.io/package/@yext/answers-react-components/versions

## README

# answers-react-components

<div>
  <a href="https://npmjs.org/package/@yext/answers-react-components">
    <img src="https://img.shields.io/npm/v/@yext/answers-react-components" alt="NPM version"/>
  </a>
  <a href="./LICENSE">
    <img src="https://img.shields.io/badge/License-BSD%203--Clause-blue.svg" alt="License"/>
  </a>
  <a href='https://coveralls.io/github/yext/answers-react-components?branch=main'>
    <img src='https://coveralls.io/repos/github/yext/answers-react-components/badge.svg?branch=main' alt='Coverage Status' />
  </a>
</div>
<br>

A library of React Components for powering Yext Search integrations.

See the [full documentation](./docs/answers-react-components.md) here.

## Getting Started

If you are using NPM 7+, you can install the components with the following command:

```bash
npm install @yext/answers-react-components
```
The @yext/answers-headless-react peer dependency will be automatically installed.

If you are using NPM 6 or Yarn, you can install the library and its peer dependencies with this command:
```bash
npx install-peerdeps @yext/answers-react-components
```
The command will work with Yarn so long as NPM 6+ is installed on the machine.

Once the library and its peer dependencies are installed, the components can be rendered using React by placing them inside the `AnswersHeadlessProvider` with the appropriate credentials:

```tsx
import { AnswersHeadlessProvider } from '@yext/answers-headless-react';
import { SearchBar, UniversalResults } from '@yext/answers-react-components';

const config = {
  apiKey: '<apiKey>',
  experienceKey: '<experienceKey>',
  locale: 'en',
  experienceVersion: 'PRODUCTION',
}

function App() {
  return (
    <AnswersHeadlessProvider {...config}>
      <SearchBar />
      <UniversalResults />
    </AnswersHeadlessProvider>
  );
}

export default App;
```

---
_Source: https://npm.io/package/@yext/answers-react-components · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
