noUiSlider range slider with full touch support.

Overview

noUiSlider is a lightweight range slider with multi-touch support and a ton of features. It supports non-linear ranges, requires no external dependencies, has keyboard support, and it works great in responsive designs. For full documentation please check the plugin's site.

Usage

noUiSlider's CSS and Javascript files are bundled in the global plugin bundles and globally included in all pages:
<link href="assets/plugins/global/plugins.bundle.css" rel="stylesheet" type="text/css"/>
<script src="assets/plugins/global/plugins.bundle.js"></script>

Initialization

  • noUiSlider's CSS is highly customized in sass/vendors/plugins/_nouislider.scssSCSS file in order to use it as native component within the design system. The SCSS code is compiled into assets/plugins/global/plugins.bundle.cssand globally included in all pages.
  • noUiSlider's Javascript is bundled in assets/plugins/global/plugins.bundle.jsand globally included in all pages.

Basic Example

Basic example of range slider with full touch support:
Min:
Max:
var slider = document.querySelector("#kt_slider_basic");
var valueMin = document.querySelector("#kt_slider_basic_min");
var valueMax = document.querySelector("#kt_slider_basic_max");

noUiSlider.create(slider, {
    start: [20, 80],
    connect: true,
    range: {
        "min": 0,
        "max": 100
    }
});

slider.noUiSlider.on("update", function (values, handle) {
    if (handle) {
        valueMax.innerHTML = values[handle];
    } else {
        valueMin.innerHTML = values[handle];
    }
});
<div class="mb-0">
    <label class="form-label">Example</label>
    <div id=""kt_slider_basic"></div>

    <div class="pt-5">
        <div class="fw-bold mb-2">Min: <span id=""kt_slider_basic_min"></span></div>
        <div class="fw-bold mb-2">Max: <span id=""kt_slider_basic_max"></span></div>
    </div>
</div>

Sizes

Change the sliders default size by applying custom size classes .noUi-smand .noUi-lg:
<div id="kt_slider_sizes_sm" class="noUi-sm"></div>

<div id="kt_slider_sizes_default"></div>

<div id="kt_slider_sizes_lg" class="noUi-lg"></div>

Vertical Example

Example of horizontal range slider
var slider = document.querySelector("#kt_slider_vertical");

noUiSlider.create(slider, {
    start: [60, 160],
    connect: true,
    orientation: "vertical",
    range: {
        "min": 0,
        "max": 200
    }
});
<div id="kt_slider_vertical"></div>

Tooltip

noUiSlider can provide a basic tooltip using the tooltips option:
var tooltipSlider = document.querySelector("#kt_slider_tooltip");

noUiSlider.create(tooltipSlider, {
    start: [20, 80, 120],
    tooltips: [false, wNumb({decimals: 1}), true],
    range: {
        "min": 0,
        "max": 200
    }
});
<div id="kt_slider_tooltip"></div>

Soft Limits

If you want to disable the edges of a slider, the set event can be used to reset the value if a limit is passed
var slider = document.querySelector("#kt_slider_soft_limits");

noUiSlider.create(slider, {
    start: 50,
    range: {
        min: 0,
        max: 100
    },
    pips: {
        mode: "values",
        values: [20, 80],
        density: 4
    }
});
<div id="kt_slider_soft_limits"></div>

Activity Logs

There are 2 new tasks for you in “AirPlus Mobile APp” project:
Added at 4:23 PM by
img
Meeting with customer
Application Design
img
img
A
In Progress
View
Project Delivery Preparation
CRM System Development
img
B
Completed
View
Invitation for crafting engaging designs that speak human workshop
Sent at 4:23 PM by
img
Task #45890merged with #45890in “Ads Pro Admin Dashboard project:
Initiated at 4:23 PM by
img
3 new application design concepts added:
Created at 4:23 PM by
img
New case #67890is assigned to you in Multi-platform Database Design project
Added at 4:23 PM by
Alice Tan
You have received a new order:
Placed at 5:05 AM by
img

Database Backup Process Completed!

Login into Jet Admin Dashboard to make sure the data integrity is OK
Proceed
New order #67890is placed for Workshow Planning & Budget Estimation
Placed at 4:23 PM by
Jimmy Bold
Upgrade To Pro
Pro Version Benefits Free Pro
UI Elements 20 100
In-house Components 20 40
Crafted Pages 5 20
Complete Documentation
Product Support
Layout Builder
Email Templates
Chat App
Customers App
Upgrade to Jet HTML Pro