Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-two-thumb-input-range
Advanced tools
Accessible two thumb input range component for React that implements
Readme
TwoThumbInputRange
is a React component allowing users to input numeric values within a specific range.
Native HTML input type=range sliders do not support multiple thumbs yet so this component uses two range inputs and position them to look like a multi-thumb slider.
Under the hood TwoThumbInputRange
uses HTML input type=range, but uses CSS Magic to allows users to adjust with 2 buttons
All examples available in Storybook
yarn add react-two-thumb-input-range
# or
npm i react-two-thumb-input-range
import { TwoThumbInputRange } from "react-two-thumb-input-range"
function App() {
const [value, setValue] = useState([1000, 4333])
const onValueSChange = (values) => {
setValue(values)
}
return <TwoThumbInputRange onChange={onValueChange} values={value} min={1000} max={10000} />
}
Attribute | Type | Default | Description |
---|---|---|---|
min | number | 0 | The minimum permitted value. |
max | number | 100 | The maximum permitted value. |
values | [number,number] | The current value of the Input Range. | |
onChange | func | Callback function that is fired when the Input's value changed. onChange: ([number, number]) => void | |
railColor | string | #EDF2F7 | Color of rail element. |
trackColor | string | #1976d2 | Color of track element. |
thumbColor | string | #EDF2F7 | Color of thumb element. |
thumbStyle | React.CSSProperties | 1976d2 | Styles applied to the thumb element |
thumbFocusStyle | React.CSSProperties | `` | Styles applied to the when thumb element focus |
inputStyle | React.CSSProperties | `` | Styles applied to the input element |
labelStyle | React.CSSProperties | `` | Styles applied to the label element |
labelTextStyle | React.CSSProperties | `` | Styles applied to the label textelement |
showLabels | boolean | true | If false, the default labels will not render. |
ariaValueText | string | MDN Web Docs |
FAQs
Accessible two thumb input range component for React that implements
The npm package react-two-thumb-input-range receives a total of 1,252 weekly downloads. As such, react-two-thumb-input-range popularity was classified as popular.
We found that react-two-thumb-input-range 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.