1.0.58 • Published 6 months ago

@trackpilots/searchable-select-dropdown v1.0.58

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@trackpilots/searchable-select-dropdown

npm license downloads

A searchable, multi-select dropdown component built with React and Tailwind CSS.

✨ Features

  • 🔍 Searchable input field
  • ✅ Multi-select support
  • 🎨 Customizable styles (color, width, height)
  • 📱 Fully responsive
  • ⚡ Easy to integrate

Screenshot

🚀 Installation

You can install the package using npm or yarn:

Using npm

npm install @trackpilots/searchable-select-dropdown

Using yarn

yarn add @trackpilots/searchable-select-dropdown

Make sure Tailwind CSS is installed in your project.

📌 Usage

1️⃣ Import the Component

import SearchableSelect from "@trackpilots/searchable-select-dropdown";
import "tailwindcss/tailwind.css"; // Ensure Tailwind is included

2️⃣ Use in Your Component

import React, { useState } from "react";
import SearchableSelect from "@trackpilots/searchable-select-dropdown";

const App = () => {
  const options = ["Mahendran Sakthi", "Jagatheesan Madheswarn", "Jefin Rojar Jeyakumar", "Sanjay Sankar", "Jagadeesh Elango"];
  const [selectedValues, setSelectedValues] = useState([]);

  const handleSelectionChange = (values) => {
    console.log("Selected values:", values);
    setSelectedValues(values);
  };

  return (
    <div className="p-4">
      <SearchableSelect 
        options={options} 
        selectedOptions={selectedValues} 
        onChange={handleSelectionChange} 
        searchPlaceholder="Search...",
        placeholder="Search..." 
        checkboxColor="#9D55FF" 
        checkboxSize="20px" 
      />
      <p className="mt-4">Selected: {selected.join(", ")}</p>
    </div>
  );
};

export default App;

🔧 Props

Prop NameTypeDefaultDescription
optionsarray[]List of dropdown options.
selectedOptionsarray[]Selected options state.
onChangefunction() => {}Callback function when selection changes.
placeholderstring"Search..."Placeholder text.
searchPlaceholderstring"Search..."Search placeholder text.
checkboxColorstring"#9D55FF"Custom checkbox color.
checkboxSizestring"16px"Custom checkbox size (height/width).

📌 Maintainers

These packages are maintained by Quick App Studio Developers.

📄 License

This project is licensed under the MIT License.

1.0.58

6 months ago

1.0.57

6 months ago

1.0.56

6 months ago

1.0.55

6 months ago

1.0.54

6 months ago

1.0.53

6 months ago

1.0.52

6 months ago

1.0.51

6 months ago

1.0.50

6 months ago

1.0.49

6 months ago

1.0.48

6 months ago

1.0.47

6 months ago

1.0.46

6 months ago

1.0.45

6 months ago

1.0.44

6 months ago

1.0.43

6 months ago

1.0.42

6 months ago

1.0.41

6 months ago

1.0.40

6 months ago

1.0.39

6 months ago

1.0.38

6 months ago

1.0.37

6 months ago

1.0.36

6 months ago

1.0.35

6 months ago

1.0.34

6 months ago

1.0.33

6 months ago

1.0.32

6 months ago

1.0.31

6 months ago

1.0.30

6 months ago

1.0.29

6 months ago

1.0.28

6 months ago

1.0.27

6 months ago

1.0.25

6 months ago

1.0.23

6 months ago

1.0.20

6 months ago

1.0.18

6 months ago

1.0.16

6 months ago

1.0.14

6 months ago

1.0.12

6 months ago

1.0.10

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.4

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago