1.0.58 • Published 11 months ago

@trackpilots/searchable-select-dropdown v1.0.58

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

11 months ago

1.0.57

11 months ago

1.0.56

11 months ago

1.0.55

11 months ago

1.0.54

11 months ago

1.0.53

11 months ago

1.0.52

11 months ago

1.0.51

11 months ago

1.0.50

11 months ago

1.0.49

11 months ago

1.0.48

11 months ago

1.0.47

11 months ago

1.0.46

11 months ago

1.0.45

11 months ago

1.0.44

11 months ago

1.0.43

11 months ago

1.0.42

11 months ago

1.0.41

11 months ago

1.0.40

11 months ago

1.0.39

11 months ago

1.0.38

11 months ago

1.0.37

11 months ago

1.0.36

11 months ago

1.0.35

11 months ago

1.0.34

11 months ago

1.0.33

11 months ago

1.0.32

11 months ago

1.0.31

11 months ago

1.0.30

11 months ago

1.0.29

11 months ago

1.0.28

11 months ago

1.0.27

11 months ago

1.0.25

11 months ago

1.0.23

11 months ago

1.0.20

11 months ago

1.0.18

11 months ago

1.0.16

11 months ago

1.0.14

11 months ago

1.0.12

11 months ago

1.0.10

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.4

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago