1.0.58 • Published 5 months ago

@trackpilots/searchable-select-dropdown v1.0.58

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

5 months ago

1.0.57

5 months ago

1.0.56

5 months ago

1.0.55

5 months ago

1.0.54

5 months ago

1.0.53

5 months ago

1.0.52

5 months ago

1.0.51

5 months ago

1.0.50

5 months ago

1.0.49

5 months ago

1.0.48

5 months ago

1.0.47

5 months ago

1.0.46

5 months ago

1.0.45

5 months ago

1.0.44

5 months ago

1.0.43

5 months ago

1.0.42

5 months ago

1.0.41

5 months ago

1.0.40

5 months ago

1.0.39

5 months ago

1.0.38

5 months ago

1.0.37

5 months ago

1.0.36

5 months ago

1.0.35

5 months ago

1.0.34

5 months ago

1.0.33

5 months ago

1.0.32

5 months ago

1.0.31

5 months ago

1.0.30

5 months ago

1.0.29

5 months ago

1.0.28

5 months ago

1.0.27

5 months ago

1.0.25

5 months ago

1.0.23

5 months ago

1.0.20

5 months ago

1.0.18

5 months ago

1.0.16

5 months ago

1.0.14

5 months ago

1.0.12

5 months ago

1.0.10

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.4

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago