DEV Community

Avnish Jayaswal
Avnish Jayaswal

Posted on • Edited on • Originally published at askavy.com

React select

Original Post
react select

How to install react select using npm

npm install --save react-select

How to use react-select multiselect



import React from "react";
import Select from "react-select";
import "./App.css";

function App() {
  const options = [
    { value: "1", label: "Chocolate" },
    { value: "2", label: "Strawberry" },
    { value: "3", label: "Vanilla" },
  ];

  return (
    <div className="App">
      <Select multi options={options} />
    </div>
  );
}

export default App;
Enter fullscreen mode Exit fullscreen mode

http://askavy.com/

Top comments (0)