1.0.58 • Published 4 months ago

@trackpilots/searchable-select-dropdown v1.0.58

Weekly downloads
-
License
MIT
Repository
github
Last release
4 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

4 months ago

1.0.57

4 months ago

1.0.56

4 months ago

1.0.55

4 months ago

1.0.54

4 months ago

1.0.53

4 months ago

1.0.52

4 months ago

1.0.51

4 months ago

1.0.50

4 months ago

1.0.49

4 months ago

1.0.48

4 months ago

1.0.47

4 months ago

1.0.46

4 months ago

1.0.45

4 months ago

1.0.44

4 months ago

1.0.43

4 months ago

1.0.42

4 months ago

1.0.41

4 months ago

1.0.40

4 months ago

1.0.39

4 months ago

1.0.38

4 months ago

1.0.37

4 months ago

1.0.36

4 months ago

1.0.35

4 months ago

1.0.34

4 months ago

1.0.33

4 months ago

1.0.32

4 months ago

1.0.31

4 months ago

1.0.30

4 months ago

1.0.29

4 months ago

1.0.28

4 months ago

1.0.27

4 months ago

1.0.25

4 months ago

1.0.23

4 months ago

1.0.20

4 months ago

1.0.18

4 months ago

1.0.16

4 months ago

1.0.14

4 months ago

1.0.12

4 months ago

1.0.10

4 months ago

1.0.8

4 months ago

1.0.7

4 months ago

1.0.6

4 months ago

1.0.4

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago