Search...

Slider

Contrast Angular Bootstrap Slider

Contrast Angular Bootstrap Slider is an interactive component that allows users to choose a value from a range of values using a sliding bar.

Applications of a Angular Bootstrap slider:

  • Brightness
  • Volume increase/decrease
  • Video Progression.

Importing the Contrast Angular Bootstrap Slider Module

To use the Contrast Angular Bootstrap Slider component in your project you need to import SliderModule.

ts
import {SliderModule } from 'cdbangular';

Slider

Angular Bootstrap Slider

HTML
html
<CDBSlider style="max-width: 300px;margin: auto;"></CDBSlider>
<CDBSlider variant='slider-warning' tooltipPlacement="bottom"
style="max-width: 300px;margin: auto; margin-top: 50px;">
</CDBSlider>
<CDBSlider tooltip="auto" style="max-width: 300px;margin: auto; margin-top: 50px;"></CDBSlider>

API Reference: Contrast Angular Bootstrap Slider Props

This section will build on your information about the props you get to use with the Contrast Angular Bootstrap Slider component. You will find out what these props do, their default values, and how you would use them in your code.

The table below lists other prop options of the CDBSlider.

NameTypeDefaultDescriptionExample
classStringAdds custom classesclass="myClass"
valueNumber or StringSlider's value - useful for additional data binding and edge use-casesvalue=49
disableBooleanfalseDisables Slider component[disabled] = false
minNumber0Sets the lowest Slider's valuemin=10
maxNumber100Sets the highest Slider's valuemax=70
stepNumber1Specifies the interval between valid values in a number-based input.step=0.1
sizeStringChanges size of slider component. Choose from lg and smsize="sm"
variantStringdarkChanges default slider color; available values: [blue, red, teal, dark-grey, dark, blue-grey, amber, purple]variant="red"
onChangefunctionReturns slider value, on onChange eventonChange=handleChange
onAfterChangefunctionexecutes a function after Change eventonAfterChange=handleAfterChange
tooltipStringDisplays the current value of the slider. Can choose from auto, on or offtooltip="on"
tooltipPlacementStringSelects where to place tooltip. Can choose from top or bottomtooltipPlacement="top"
tooltipLabelfunctionSets the label of the tooltiptooltipLabel=yourFunction
tooltipStyleObjectCustomize the style of the tooltiptooltipStyle= color: "red"

Build modern projects using Bootstrap 5 and Contrast

Trying to create components and pages for a web app or website from scratch while maintaining a modern User interface can be very tedious. This is why we created Contrast, to help drastically reduce the amount of time we spend doing that. so we can focus on building some other aspects of the project.

Contrast Bootstrap PRO consists of a Premium UI Kit Library featuring over 10000+ component variants. Which even comes bundled together with its own admin template comprising of 5 admin dashboards and 23+ additional admin and multipurpose pages for building almost any type of website or web app.
See a demo and learn more about Contrast Bootstrap Pro by clicking here.

ad-banner