@zendeskgarden/react-tags
v9.4.0
Published
Components relating to tags in the Garden Design System
Downloads
819,306
Maintainers
Readme
@zendeskgarden/react-tags
This package includes components relating to tags in the Garden Design System.
Installation
npm install @zendeskgarden/react-tags
# Peer Dependencies - Also Required
npm install react react-dom styled-components @zendeskgarden/react-theming
Usage
import { ThemeProvider } from '@zendeskgarden/react-theming';
import { Tag } from '@zendeskgarden/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>;