
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
react-bootstrap-counter
Advanced tools
A counter input component for react using bootstrap
react-bootstrap-counter uses bootstrap and font-awesome for styling so don't forget to include them.
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
npm install react-bootstrap-counter --save
import React from 'react';
import ReactDOM from 'react-dom';
import CounterInput from 'react-bootstrap-counter';
ReactDOM.render(<CounterInput value={2} min={1} max={50} onChange={ (value) => { console.log(value) } } />, document.getElementById('page'));
Initial value of the input default is 0
.
<CounterInput value="1" />
Maximum range input value can go default is infinite
.
<CounterInput max={40} />
Maximum range input value can go default is 0
.
<CounterInput min={10} />
Get called whenever input field value gets changed returns input value
as a argument.
<CounterInput onChange={ (value) => { console.log(value) } } />
The main parent div is consist of a class .counter-input
with this you can style its children because react-bootstrap-counter uses bootstrap you can customize it fairly easily
/* to style input use */
.counter-input .form-control {
/* your style */
}
/* to style buttons use */
.counter-input .input-group-addon {
/* your style */
}
Using this component then please star this component and feel free to contribute.
FAQs
A counter input component for react using bootstrap
The npm package react-bootstrap-counter receives a total of 9 weekly downloads. As such, react-bootstrap-counter popularity was classified as not popular.
We found that react-bootstrap-counter 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.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.