# @s-ui/react-molecule-input-tags

> `MoleculeInputTags` is an `AtomInput` with the behavior of adding/removing `AtomTag` as a list

Latest version **3.2.0** (published 2025-02-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @s-ui/react-molecule-input-tags
pnpm add @s-ui/react-molecule-input-tags
yarn add @s-ui/react-molecule-input-tags
bun add @s-ui/react-molecule-input-tags
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.2.0 |
| Published | 2025-02-24 |
| First published | 2018-11-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 14.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 147 |
| Maintainers | alejandro.ferrante, ivanmlaborda, salvador.juan, andresin87.adevinta, izeller, gfabregoadv, a.ferrer, ignacio_navarro, oscar_ramirez, jordi.munoz, joanleon-adv, aitor.rodriguez, luis-garrido, jenifer.lopez, isabelgomez87, pa.chruscinski.ext, schibstedspain, alfredo.arronte, belen.santos, xavi_ballestar, ferrangbtw, jamile.radloff, davidmartin2108, sergi.quintela, estefania_garcia, carlosvillu-adevinta, miriam-gil, arnau.guell, ferran.simon, victor.perez.adevinta, mariapaula.forero.ext, oscar.gomez, david.nieto, oriol.puig, nacho_torrella, xavi.murcia, ignacio.rodriguez, francisco.ruiz.lloret, sziauberyte, alfredo.zimperz, andresadv, javiauso, alverd004, marian.lucaci, pablogs, alisa_bayanova, cristhianb, sergiocollado, pablo.rey-adevinta, beatrizip, alex.castells, david.cuadrado.ext, giovanny.sayas.ext, patricio.sartore, azahara, marc.benito, sergio.escano, cristina.rodriguez.duque, pol.valls, frandelacasa-adevinta, carolina.mallo.ext, daniel.perez.ext, hpintos_adevinta, carlos.gonzalezl, albert.peiro, oscar-raig-adevinta, thomas.page.ext, sebastian.badea.adevinta, victoria.pasichnyk.ext, sendami.luque.ext, luz_adv, alfredo.narvaez, ruben-martin, dann41, emiliovz, adria.velardos, arturo.vicente, diegomr, sergi.martinez.adevinta, guillemgc3, frontend-jobs, javiermiguel, atilioscolaroadv, crotundu.adevinta, candymd, florinz, denis_z |
| Keywords | @s-ui, react, component, molecule, inputTags |

## Links

- npm: https://www.npmjs.com/package/@s-ui/react-molecule-input-tags
- Repository: https://github.com/SUI-Components/sui-components
- Homepage: https://sui-components.vercel.app/
- Issues: https://github.com/SUI-Components/sui-components/issues?q=is%3Aopen+label%3A%22Component%3A+inputTags%22
- npm.io page: https://npm.io/package/@s-ui/react-molecule-input-tags

## Dependencies (3)

- [@s-ui/react-hooks](https://npm.io/package/@s-ui/react-hooks.md) 1
- [@s-ui/react-atom-tag](https://npm.io/package/@s-ui/react-atom-tag.md) 4
- [@s-ui/react-atom-input](https://npm.io/package/@s-ui/react-atom-input.md) 5

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 3.2.0 (latest) — 2025-02-24
- 2.25.0-beta.1 (beta) — 2022-10-26
- 3.1.0 — 2025-02-24
- 3.0.0 — 2025-02-21
- 2.29.0 — 2025-02-04
- 2.28.0 — 2023-07-11
- 2.27.0 — 2023-05-05
- 2.26.0 — 2023-01-10
- 2.25.0-beta.0 — 2022-09-23
- 2.25.0 — 2022-07-28
- 2.24.0 — 2022-07-28
- 2.23.0 — 2022-07-27
- 2.22.0 — 2022-06-23
- 2.21.0 — 2021-11-10
- 2.20.0 — 2021-10-28
- … 22 more at https://npm.io/package/@s-ui/react-molecule-input-tags/versions

## README

# MoleculeInputTags

`MoleculeInputTags` is an `AtomInput` with the behavior of adding/removing `AtomTag` as a list

[![documentation](https://img.shields.io/badge/read%20the%20doc-black?logo=readthedocs)](https://sui-components.vercel.app/workbench/molecule/inputTags/)
[![issue](https://img.shields.io/badge/report%20a%20bug-black?logo=openbugbounty&logoColor=red)](https://github.com/SUI-Components/sui-components/issues/new?&projects=4&template=bug-report.yml&assignees=&template=report-a-bug.yml&title=🪲+&labels=bug,component,molecule,inputTags)
[![npm](https://img.shields.io/npm/dt/%40s-ui/react-molecule-input-tags?logo=npm&labelColor=black)](https://www.npmjs.com/package/@s-ui/react-molecule-input-tags)

[![Issues open](https://img.shields.io/github/issues-search/SUI-Components/sui-components?query=is%3Aopen%20label%3Acomponent%20label%3AinputTags&logo=openbugbounty&logoColor=red&label=issues%20open&color=red)](https://github.com/SUI-Components/sui-components/issues?q=is%3Aopen+label%3Acomponent+label%3AinputTags)
[![NPM](https://img.shields.io/npm/l/%40s-ui%2Freact-molecule-input-tags)](https://github.com/SUI-Components/sui-components/blob/main/components/molecule/inputTags/LICENSE.md)

## Installation

```sh
$ npm install @s-ui/react-molecule-input-tags --save
```

## Usage

```js
import MoleculeInputTags from '@s-ui/react-molecule-input-tags'
const closeIcon = () => <span>X</span>
```

### Basic usage

```js
<MoleculeInputTags tagsCloseIcon={closeIcon} />
```

### Entering tags on Tab

```js
<MoleculeInputTags tagsCloseIcon={closeIcon} onEnterKey="Tab" />
```

### Initial list of tags

```js
<MoleculeInputTags tagsCloseIcon={closeIcon} tags={['john','paul','george','ringo']} />
```

### `AtomInput` props

All props of `AtomInput` can also be passed to `MoleculeInputTags`

```js
<MoleculeInputTags tagsCloseIcon={closeIcon} errorState={true} />
```

### Just unique values

You can set `allowDuplicates` to false to force unique values

```js
<MoleculeInputTags allowDuplicates={false} />
```

### Max tags

use `maxTags` prop to set a number of maximum tags that can be entered, after reaching that number the field gets disabled

```js
<MoleculeInputTags maxTags={3} />
```


> **Find full description and more examples in the [demo page](https://sui-components.now.sh/workbench/molecule/inputTags/demo).**

---
_Source: https://npm.io/package/@s-ui/react-molecule-input-tags · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
