
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
react-tag-input-component
Advanced tools
lightweight component for tag(s) input
also see multi select component
npm i react-tag-input-component # npm
yarn add react-tag-input-component # yarn

import React, { useState } from "react";
import { TagsInput } from "react-tag-input-component";
const Example = () => {
const [selected, setSelected] = useState(["papaya"]);
return (
<div>
<h1>Add Fruits</h1>
<pre>{JSON.stringify(selected)}</pre>
<TagsInput
value={selected}
onChange={setSelected}
name="fruits"
placeHolder="enter fruits"
/>
<em>press enter or comma to add new tag</em>
</div>
);
};
export default Example;
| Prop | Description | Type | Default |
|---|---|---|---|
name | value for name of input | string | |
placeholder | placeholder for text input | string | |
value | initial tags | string[] | [] |
onChange | onChange callback (added/removed) | string[] | |
classNames | className for styling input and tags (i.e {tag:'tag-cls', input: 'input-cls'}) | object[tag, input] | |
onKeyUp | input onKeyUp callback | event | |
onBlur | input onBlur callback | event | |
separators | when to add tag (i.e. "Enter", " ") | string[] | ["Enter"] |
removers | Remove last tag if textbox empty and Backspace is pressed | string[] | ["Backspace"] |
onExisting | if tag is already added then callback | (tag: string) => void | |
onRemoved | on tag removed callback | (tag: string) => void | |
beforeAddValidate | Custom validation before adding tag | (tag: string, existingTags: string[]) => boolean | |
isEditOnRemove | Remove the tag but keep the word in the input to edit it on using Backscape Key | boolean | false |
You can override CSS variables to customize the appearance
.rti--container {
--rti-bg: "#fff",
--rti-border: "#ccc",
--rti-main: "#3182ce",
--rti-radius: "0.375rem",
--rti-s: "0.5rem", /* spacing */
--rti-tag: "#edf2f7",
--rti-tag-remove: "#e53e3e",
}
use
!importantif CSS variables are not getting applied
MIT © harshzalavadiya
FAQs
lightweight component for tag(s) input
The npm package react-tag-input-component receives a total of 20,718 weekly downloads. As such, react-tag-input-component popularity was classified as popular.
We found that react-tag-input-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.