# @yext/react-components

Latest version **0.0.6** (published 2023-07-17) · 0 weekly downloads

## Install

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

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2023-07-17 |
| First published | 2023-03-27 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 13 |
| Unpacked size | 292.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | slapshot@yext.com |
| Maintainers | nbramblett, nsiskind, saahith, emilyzhang777, sscott24, ydaniel, junpark1213, dsurducan, afriedman00, lilwang, dgurland, dwon, htamirepi, ajgist, yunxiashi, emilyfranklin, msporer-yext, pgill, snagabhirava, twhiteyext, ewu42, bryanreed, dlsgusrn7577, klu, paigep, stellali, petya182, ptroupgalligan, syhanley, zhengzhi, 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, afitzgeraldyext, mwoon, willgorick, bhaines-yext, aliang_yext, zgeier, sgresh_yext, rconsalo, stephenrva, jbaik, sjayakumar, tritpham, ttimblin, sharvey, wenright-yext, npatel94, telliottyext, johncho92, canderson_yext, gweiler, ssaunders, sukim, rpope, eal172, peteros, jachen1997, jesuyed, ytruong, joshuahsueh |

## Links

- npm: https://www.npmjs.com/package/@yext/react-components
- npm.io page: https://npm.io/package/@yext/react-components

## Dependencies (13)

- [lexical](https://npm.io/package/lexical.md) ^0.9.0
- [mapbox-gl](https://npm.io/package/mapbox-gl.md) ^2.11.0
- [rehype-raw](https://npm.io/package/rehype-raw.md) ^5.0.0
- [remark-gfm](https://npm.io/package/remark-gfm.md) ^1.0.0
- [@lexical/code](https://npm.io/package/@lexical/code.md) ^0.9.0
- [@lexical/link](https://npm.io/package/@lexical/link.md) ^0.9.0
- [@lexical/list](https://npm.io/package/@lexical/list.md) ^0.9.0
- [@lexical/react](https://npm.io/package/@lexical/react.md) ^0.9.0
- [@lexical/table](https://npm.io/package/@lexical/table.md) ^0.9.0
- [react-markdown](https://npm.io/package/react-markdown.md) ^6.0.3
- [rehype-sanitize](https://npm.io/package/rehype-sanitize.md) ^4.0.0
- [@lexical/hashtag](https://npm.io/package/@lexical/hashtag.md) ^0.9.0
- [@lexical/rich-text](https://npm.io/package/@lexical/rich-text.md) ^0.9.0

## Recent versions

- 0.0.6 (latest) — 2023-07-17
- 0.0.7-beta.0 (beta) — 2023-09-08
- 0.0.5 — 2023-06-01
- 0.0.4 — 2023-05-18
- 0.0.3 — 2023-04-26
- 0.0.2 — 2023-04-13
- 0.0.1 — 2023-04-11
- 0.0.0 — 2023-03-27

## README

# react-components

<div>
  <a href="https://npmjs.org/package/@yext/react-components">
    <img src="https://img.shields.io/npm/v/@yext/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/react-components?branch=main'>
    <img src='https://coveralls.io/repos/github/yext/react-components/badge.svg?branch=main' alt='Coverage Status' />
  </a>
</div>
<br>

A library of React Components for rendering data of complex types in the Yext platform. See [@yext/types](https://github.com/yext/types) for type declarations.

## Directory

Currently providing the following react components, with plans for more to come in 1.0.0 release.

| Component  | Type       | Demo                                                                                        |
| ---------- | ---------- | ------------------------------------------------------------------------------------------- |
| Image      | Image      | [Storybook](https://leniently-relative-caiman.pgsdemo.com/?path=/story/image--primary)      |
| Address    | Address    | [Storybook](https://leniently-relative-caiman.pgsdemo.com/?path=/story/address--primary)    |
| Hours      | Hours      | [Storybook](https://leniently-relative-caiman.pgsdemo.com/?path=/story/hours--primary)      |
| HoursTable | Hours      | [Storybook](https://leniently-relative-caiman.pgsdemo.com/?path=/story/hourstable--primary) |
| Map        | Coordinate | [Storybook](https://leniently-relative-caiman.pgsdemo.com/?path=/story/mapboxmap--primary)  |

## Getting Started

```bash
npm install @yext/react-components
```

Once the library is installed, our React Components should be available throughout your application.

```tsx
import {
  Address as AddressType,
  Hours as HoursType,
  Image as ImageType,
  Coordinate,
} from "@yext/types";
import { Address, Hours, Image, Map } from "@yext/react-components";

interface LocationProps = {
  address: AddressType;
  hours: HoursType;
  c_storefront: ImageType;
  locationCoordinate: Coordinate;
}

const Location = (props: LocationProps) => {
  return (
    <>
      <Address address={props.address} />
      <Hours hours={props.hours} />
      <Image image={props.c_storefront} />
      <Map markerLocations={[props.locationCoordinate]} />
    </>
  );
}

export default Location;
```

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