
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
@bscop/react-select
Advanced tools
Accessible select (in React).
npm i @bscop/react-select
import Select from "@bscop/react-select";
function App () {
return (
<Select
label="Pick a fruit"
onChange={
(option) => {
alert(`Option selected: "${option.label}"`);
}
}
options={
[
{
id: "a",
label: "Apple",
},
{
id: "b",
label: "Banana",
},
{
id: "c",
label: "Cherry",
},
]
}
/>
);
}
Optional. Additional css class that is going to be applied on the select root element.
Optional. Default false
. Determine whether the selected should be selected.
A label that describes the purpose of the select component.
List of options.
Each option should have shape as { id : string; label : string; value ?: string | number; }
Optional. Handler executed when the selected option change.
Receive the new selected option, and its index, as argument.
Optional. Determine the label rendered in the select hook button when there's no selected option.
Optional. Permits to customise the content of the select hook button.
Optional. Permits to customise how each option is rendered.
Optional. Default false
. Determine whether the option list should be scrollable, in case the select contains a large number of options.
Optional. Value of the selected option.
You can set the following CSS Custom properties to customize the look of the dropdown component:
:root {
--main-color: black;
--main-bg-color: white;
--dropdown-hook-border-color: #000;
--dropdown-hook-disabled-border-color: #bababa;
--dropdown-border-color: #bababa;
--select-caret: url("data:image/png;base64,...");
--select-active-option-bg-color: #eaeaea;
}
Read the guidelines.
npm test
Coverage reports are hosted on codecov.
npm run badge:coverage -- --token=<guid>
Bruno Scopelliti
www.brunoscopelliti.com
FAQs
Accessible select (in React).
The npm package @bscop/react-select receives a total of 1 weekly downloads. As such, @bscop/react-select popularity was classified as not popular.
We found that @bscop/react-select demonstrated a not healthy version release cadence and project activity because the last version was released 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.