
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
react-select-search-sm
Advanced tools
React Select Search component that supports single and multiple selections.
A lightweight and customizable React dropdown component with support for:
npm install react-select-search-sm
To apply the default styles, import the CSS file in your root component or wherever appropriate:
import "react-select-search-sm/dist/index.css";
import React, { useState } from "react";
import SelectSearch from "react-select-search-sm";
import "react-select-search-sm/dist/index.css";
const options = [
{ name: "Option A", value: "A" },
{ name: "Option B", value: "B" },
];
function App() {
const [selected, setSelected] = useState([]);
return (
<SelectSearch
options={options}
selectedOption={selected}
setSelectedOption={setSelected}
multi={false} // true -- for multi select
label="Select item"
searchPlaceholder="Search"
handleChange=null
/>
);
}
export default App;
Prop | Type | Default | Description |
---|---|---|---|
options | array | [] | List of options (each with name and value keys) |
selectedOption | array | [] | Currently selected option(s) |
setSelectedOption | function | () => {} | Setter to update selected option(s) |
multi | boolean | false | Enables multi-select mode if true , single-select if false |
label | string | "Select" | Placeholder label shown when nothing is selected |
searchPlaceholder | string | "search.." | Placeholder inside the search input |
notFound | string | "No data found" | Text shown when no options match the search term |
handleChange | function | null | Optional callback triggered when selection changes |
FAQs
React Select Search component that supports single and multiple selections.
The npm package react-select-search-sm receives a total of 23 weekly downloads. As such, react-select-search-sm popularity was classified as not popular.
We found that react-select-search-sm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.