Git Product home page Git Product logo

yii2-slider's Introduction

yii2-slider

An advanced slider input for Yii Framework 2 based on seiyria/bootstrap-slider plugin, which is a fork of the bootstrap-slider by Stefan Petre from eyecon.ru. The slider input offers these advanced features

  • vertical or horizontal orientation of slider
  • setup your minimum and maximum values
  • setup your step increments
  • range selector (multiple handles to control the range)
  • three shapes for handles
  • touch capablity and support for touch devices

Additional enhancements added for this widget (by Krajee):

  • allows to configure slider selection and handle colors.
  • preselected styles to color your slider and handles.
  • automatically trigger change of base field on slider stop to enforce Yii ActiveField validation
  • automatically set plugin options based on base field value (parse array input value for range)
  • automatically disable slider based on disabled/readonly options.

Demo

You can see detailed documentation on usage of the extension.

Latest Release

NOTE: The latest version of the module is v1.4.0 released on 25-Oct-2014. Refer the CHANGE LOG for details.

Installation

The preferred way to install this extension is through composer.

NOTE: Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json.

Either run

$ php composer.phar require kartik-v/yii2-slider "dev-master"

or add

"kartik-v/yii2-slider": "dev-master"

to the require section of your composer.json file.

Usage

Slider

use kartik\slider\Slider;
echo Slider::widget([
    'sliderColor' => Slider::TYPE_DANGER,
    'handleColor' => Slider::TYPE_DANGER,
    'pluginOptions' => [
        'orientation' => 'horizontal',
        'handle' => 'round',
        'min' => 0,
        'max' => 255,
        'step' => 1
    ],
]); 

License

yii2-slider is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.

yii2-slider's People

Contributors

arnaud-g1 avatar chabberwock avatar jasonhancock avatar kartik-v avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.