🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

@angular2-material/slider

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular2-material/slider

Angular 2 Material Slider

Source
npmnpm
Version
2.0.0-alpha.8
Version published
Weekly downloads
34
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

md-slider

MdSlider is a component that allows users to select from a range of values by moving the slider thumb. You can read more about the slider in the Material Design spec.

Not Yet Implemented

  • Thumb Label
  • Color
  • Invert
  • NgModel
  • Keyboard Movement
  • Focus Ring
  • Smaller/grey thumb at minimum value

Usage

Setup

Importing the module:

 @NgModule({
    imports: [MdSliderModule],
    ...
 })
 export class MyAppModule { }

Basic Usage

md-slider can be used on its own as a slider with a min of 0, a max of 100, and a step of 1.

<md-slider></md-slider>

Slider with Minimum and Maximum Values

The min and max on a md-slider can be set to give a different range of values. These can be set individually and do not need to both be set.

<md-slider min="1" max="5"></md-slider>

Disabled Slider

md-slider can be disabled so that the value cannot be changed and the thumb cannot be moved.

<md-slider disabled></md-slider>

Slider with Value

md-slider can have a value defined so that it starts at a specific value on the slider.

<md-slider value="24"></md-slider>

Slider with Step

md-slider can have the step defined which declares where the thumb can snap to.

<md-slider step="5"></md-slider>

Slider with Tick Interval

md-slider can have a tick interval set to a number or to auto. auto will automatically draw tick marks on steps that are at least 30px apart and will always draw tick marks at the beginning and end of the slider. Setting tick-interval to a number will draw a tick mark at every tick-interval steps. An example of this is a tick-interval of 3 with a step of 4 will draw tick marks at every 3 steps, which is the same as every 12 values.

<md-slider tick-interval="auto"></md-slider>
<md-slider tick-interval="3" step="4"></md-slider>

<md-slider>

Bound Properties

NameTypeDescription
minnumberOptional, the minimum number for the slider. Default = 0.
maxnumberOptional, the maximum number for the slider. Default = 100.
valuenumberOptional, the value to start the slider at.
tick-interval`"auto"number`
stepnumberOptional, declares where the thumb will snap to. Default = 1.
disabledbooleanOptional, whether or not the slider is disabled. Default = false.

Keywords

angular

FAQs

Package last updated on 02 Sep 2016

Did you know?

Socket

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.

Install

Related posts