Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
react-select-pure
Advanced tools
<select>
component. Easy-to-use, accessible, mobile friendly and super efficient.SelectPure is a Web Component (Custom Element) which makes it super easy to use and customize. Main goal is to use extended API of the native HTML <select>
element and provide additional features, like autocomplete, custom styling and many more. The package itself is stable to be used, however, if you've found any issues, please report them here or create a PR of your own.
Interactive demo with many examples is available here.
SelectPure is very easy to use. At first you have to install a package
yarn add react-select-pure
or
npm i react-select-pure --save
then include it in your JavaScript file:
import { SelectPure } from "react-select-pure";
<SelectPure
name="country"
id="country"
options={[
{ value: "", disabled: true, hideen: true, label: "-- Please select a country --" },
{ value: "UA", label: "Ukrane" },
{ value: "PL", label: "Poland" },
{ value: "DE", label: "Germany" },
{ value: "US", label: "USA" },
{ value: "RU", label: "Russia", disabled: true }
]}
/>
<select-pure>
supports the following attributes: name
, id
, multiple
, default-label
and disabled
.
<option-pure>
supports value
, label
, disabled
, selected
and hidden
attributes.
SelectPure offers high level of customisation. You can match any design you want by just providing a simple set of css variables. Below you can find their names and default values that are included in the package.
select-pure {
--select-height: 44px;
--select-width: 100%;
--border-radius: 4px;
--border-width: 1px;
--border-color: #000;
--padding: 0 10px;
--dropdown-z-index: 2;
--disabled-background-color: #bdc3c7;
--disabled-color: #ecf0f1;
--background-color: #fff;
--color: #000;
--hover-background-color: #e3e3e3;
--hover-color: #000;
--selected-background-color: #e3e3e3;
--selected-color: #000;
--dropdown-gap: 0;
--font-size: 14px;
--font-family: inherit;
--font-weight: 400;
--select-outline: 2px solid #e3e3e3;
--dropdown-items: 4;
}
<form>
supportIf you place <SelectPure />
inside a <form>
and specify a name
or id
props, it will then append a hidden input
with a given name inside a <form>
and trigger change
event, when value is selected.
MIT
FAQs
React wrapper for SelectPure component
The npm package react-select-pure receives a total of 0 weekly downloads. As such, react-select-pure popularity was classified as not popular.
We found that react-select-pure 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.