@zendeskgarden/react-tags
Version:
Components relating to tags in the Garden Design System
37 lines (29 loc) • 934 B
Markdown
# /react-tags [](https://www.npmjs.com/package/@zendeskgarden/react-tags)
This package includes components relating to tags in the
[Garden Design System](https://zendeskgarden.github.io/).
## Installation
```sh
npm install /react-tags
# Peer Dependencies - Also Required
npm install react react-dom styled-components /react-theming
```
## Usage
```jsx
import { ThemeProvider } from '/react-theming';
import { Tag } from '/react-tags';
/**
* Place a `ThemeProvider` at the root of your React application
*/
<ThemeProvider>
<Tag pill>
<Tag.Avatar>
<img alt="" src="images/user.png" />
</Tag.Avatar>
Example User
<Tag.Close
aria-label="press delete to remove Example User tag"
onClick={() => alert('remove tag')}
/>
</Tag>
</ThemeProvider>;
```