Skip to content

🍟A React component library for managing email input as chips.

License

Notifications You must be signed in to change notification settings

koalalikecode/react-mail-chips

Repository files navigation

React Mail Chips

A React component library for managing email input as chips.

  • Easy to configure
  • No dependency
  • Simple to use

Table of Contents

Installation

Install the library using npm:

npm install react-mail-chips

Or using yarn:

yarn add react-mail-chips

Usage

Here's a basic example of how to use the ReactMailChips component:

import React, { useState } from "react";
import { ReactMailChips } from "react-mail-chips";

const App = () => {
  const [emails, setEmails] = useState<string[]>([]);

  return (
    <div>
      <ReactMailChips emails={emails} setEmails={setEmails} />
    </div>
  );
};

export default App;

Props

Property Type Description Default
emails string[] An array of email strings.
setEmails (emails:string[]) => void A function to update the emails array.
className string? Additional class names for the container. ""
chipClassName string? Additional class names for each chip. ""
inputContainerClassName string? Additional class names for the input container. ""
placeholder string? Placeholder text for the input field. ""
delimiters string[]? An array of delimiters to separate emails. ["Enter",",",";"]

License

This project is licensed under the MIT License

About

🍟A React component library for managing email input as chips.

Resources

License

Stars

Watchers

Forks

Packages

No packages published