{"id":13580567,"url":"https://github.com/npnm/NpnSlider","last_synced_at":"2025-04-06T02:32:00.353Z","repository":{"id":32927484,"uuid":"139236862","full_name":"npnm/NpnSlider","owner":"npnm","description":"A multi range slider component using Angular","archived":false,"fork":false,"pushed_at":"2023-03-02T01:43:46.000Z","size":3307,"stargazers_count":14,"open_issues_count":19,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-11T09:23:55.968Z","etag":null,"topics":["angular","angular-component","component","multi-range-slider","npn-slider","slider-component"],"latest_commit_sha":null,"homepage":"https://npnm.github.io/NpnSlider","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/npnm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-06-30T09:32:05.000Z","updated_at":"2024-08-11T09:23:55.969Z","dependencies_parsed_at":"2024-04-08T18:06:43.068Z","dependency_job_id":null,"html_url":"https://github.com/npnm/NpnSlider","commit_stats":{"total_commits":168,"total_committers":3,"mean_commits":56.0,"dds":0.0892857142857143,"last_synced_commit":"b129b014554572d9d7c45130f1c6bc53fd2722bf"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npnm%2FNpnSlider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npnm%2FNpnSlider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npnm%2FNpnSlider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npnm%2FNpnSlider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/npnm","download_url":"https://codeload.github.com/npnm/NpnSlider/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223233097,"owners_count":17110588,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular-component","component","multi-range-slider","npn-slider","slider-component"],"created_at":"2024-08-01T15:01:53.154Z","updated_at":"2024-11-05T19:32:35.704Z","avatar_url":"https://github.com/npnm.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# [NpnSlider](https://npnm.github.io/NpnSlider/) (A Multi Range Slider Component)\n[![NPM Version](https://img.shields.io/npm/v/npn-slider)](https://www.npmjs.com/package/npn-slider)\n[![License](https://img.shields.io/github/license/npnm/npnslider)](LICENSE)\n[![Build Status](https://travis-ci.org/npnm/NpnSlider.svg?branch=master)](https://travis-ci.org/npnm/NpnSlider)\n\nNpnSlider 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.\n\n## Installation\n### [NPM](https://www.npmjs.com/package/npn-slider)\n```sh\nnpm install --save npn-slider\n```\n### [Yarn](https://yarnpkg.com/en/package/npn-slider)\n```sh\nyarn add npn-slider\n```\n## Usage\n### Html\n```html\n\u003cnpn-slider [min]=\"2006\" [max]=\"2020\" (onChange)=\"onSliderChange($event)\"\u003e\u003c/npn-slider\u003e\n```\n### Attributes\nAttributes | Description\n-----------|------------\n@Input() \u003cbr\u003e **min**: number | The minimum value of slider\n@Input() \u003cbr\u003e **max**: number | The maximum value of slider\n@Input() \u003cbr\u003e **step**: number | The value at which slider value should change\n@Input() \u003cbr\u003e **showStepIndicator**: boolean | Whether the step indicator should display or not\n@Input() \u003cbr\u003e **minSelected**: number | The selected value for slider's left handler\n@Input() \u003cbr\u003e **maxSelected**: number | The selected value for slider's right handler\n@Input() \u003cbr\u003e **disabled**: string | To disable the slider. Valid values: _'true'_ or _'disabled'_ or _empty attribute_\n@Input() \u003cbr\u003e **multiRange**: boolean | To switch between Mutli range and Single range mode. Slider is multi range by default\n@Input() \u003cbr\u003e **hide-tooltip**: boolean | To hide the tooltip that shows on hover of slider handler. Default value: _'false'_\n@Input() \u003cbr\u003e **hide-values**: boolean | To hide values displayed at bottom of slider. Default value: _'false'_\n@Output() \u003cbr\u003e **onChange**: EventEmitter\u003cnumber[]\u003e() | The event will be fired on change of selected range of values.\u003cbr\u003e_Returns: Selected range of values as an array[],_ \u003cbr\u003e_On Single range mode, a number array with single value will be returned_\n\n### Example and Sample Code\na) **Import _'NpnSliderModule'_ in your app module**\n```ts\nimport { NpnSliderModule } from \"npn-slider\";\n  \n@NgModule({\n  imports:[\n    ..\n    NpnSliderModule\n    ..\n  ]\n})\n``` \nb) **Add _'npn-slider'_ in your component html**\n```html\n\u003cnpn-slider [min]=\"1000\" [max]=\"5000\" (onChange)=\"onSliderChange($event)\" [step]=\"500\" [showStepIndicator]=\"true\"\u003e\u003c/npn-slider\u003e\n```\nc) **Add a method in your component class to listen for onChange event from slider** \n```ts\n/*Method to listen for onChange event from slider*/\nonSliderChange(selectedValues: number[]) {\n    this._currentValues = selectedValues;\n}\n```\nd) **You done. Run your app. cheers!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpnm%2FNpnSlider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpnm%2FNpnSlider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpnm%2FNpnSlider/lists"}