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.
npn-slider
Advanced tools
Readme
NpnSlider is a reusable range slider component using Angular v6.0. It can be used either as a multi range or a single range slider. By default, it is a multi range slider.
<npn-slider [min]="2006" [max]="2020" (onChange)="onSliderChange($event)"></npn-slider>
Attributes | Description |
---|---|
@Input() min: number | The minimum value of slider |
@Input() max: number | The maximum value of slider |
@Input() step: number | The value at which slider value should change |
@Input() showStepIndicator: boolean | Whether the step indicator should display or not |
@Input() minSelected: number | The selected value for slider's left handler |
@Input() maxSelected: number | The selected value for slider's right handler |
@Input() disabled: string | To disable the slider. Valid values: 'true' or 'disabled' or empty attribute |
@Input() multiRange: boolean | To switch between Mutli range and Single range mode. Slider is multi range by default |
@Input() hide-tooltip: boolean | To hide the tooltip that shows on hover of slider handler. Default value: 'false' |
@Input() hide-values: boolean | To hide values displayed at bottom of slider. Default value: 'false' |
@Output() onChange: EventEmitter<number[]>() | The event will be fired on change of selected range of values. Returns: Selected range of values as an array[], On Single range mode, a number array with single value will be returned |
a) Import 'NpnSliderModule' in your app module
import { NpnSliderModule } from "npn-slider";
@NgModule({
imports:[
..
NpnSliderModule
..
]
})
b) Add 'npn-slider' in your component html
<npn-slider [min]="1000" [max]="5000" (onChange)="onSliderChange($event)" [step]="500" [showStepIndicator]="true"></npn-slider>
c) Add a method in your component class to listen for onChange event from slider
/*Method to listen for onChange event from slider*/
onSliderChange(selectedValues: number[]) {
this._currentValues = selectedValues;
}
d) You done. Run your app. cheers! View Demo
FAQs
A multi range slider component using Angular v6.0
The npm package npn-slider receives a total of 249 weekly downloads. As such, npn-slider popularity was classified as not popular.
We found that npn-slider 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.