1.0.1 • Published 4 years ago

react-multi-autocomplete v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

React Multi Autocomplete

CI Actions Status

Installation

yarn add react-multi-autocomplete

or if you use npm

npm install --save react-multi-autocomplete

Usage

import React from "react";
import Autocomplete from "react-multi-autocomplete";

const Form = () => {
    const onSubmit = input => {
        // Logic
    };

    return (
        <Autocomplete
            onSubmit={onSubmit}
            autocompletions={{
                "@": ["John", "Lisa", "Matt"],
                "#": ["Outdoor", "Food", "Gaming"],
            }}
        >
            <Autocomplete.input placeholder="What did you do today?" />
            <Autocomplete.listItem
                highlightedStyle={{
                    backgroundColor: "#EEEEEE",
                }}
            />
        </Autocomplete>
    );
};

Development

Workflow

yarn start

This builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.

Storybook

yarn storybook

This loads the stories from ./stories.

Tests

Tests are setup with Jest

yarn test

Build

yarn build

License

MIT © thomasrogerlux

1.0.1

4 years ago

1.0.0

4 years ago

0.1.0

4 years ago