From Learn About the Ext JavaScript Library
| Summary: A multi-purpose slider component
|
| Author: Jared Gisin
|
| Published: November 13, 2007
|
| Version: 0.1
|
| Ext Version: 1.1
|
| License: MIT
|
| Demo Link: View Demo
|
| Forum Post: View Post
|
Status
Version 0.1 now available with lots of improvements and features.
Feature list approaches YUI version.
Frameworks provides a generalized slider widget that can be used for multiple purposes.
Current Features
- Horizontal, vertical and 2D area slider zones
- Multiple sliders per slide zone
- Configuration and API control to allow/disallow sliders to cross over each other; works for provided for horizontal and vertical slide zones
- Two different types of sliders; thumb slider for choosing a single value, range slider for choosing a range of values (start and end)
- Arbitrary slide zone length, movement constraint (step, snap) increment, start and end values per axis.
- Slide zone and sliders appearance mostly driven by CSS
- Complete examples
- Events support including dragstart, drag, dragend, slider mouseover, slider mouseout
- Works in Safari 3, FireFox 2, IE 6
Future Improvements
- Full documentation
- Ext 2.0 support
- Code refactoring for performance improvements
- Support for non-overlapping sliders in an area slide zone
- API to set value of slider including animation/
- API to set slider snap (step increment)
- Support for slide zone click and keypress events
- Support for setting slider return value precision/rounding
- Improved default graphics (currently uses YUI graphics)
- Feature parity with YUI slider: http://developer.yahoo.com/yui/slider/
- Slider bar and handles fully skinnable via CSS
- Other suggestions are welcome!
Use Cases
- Standard slider
- Map zoom selector
- RGB color chooser
- Multi-handle range filter (e.g., dollar amount range or date range)
History
Code is based off of sample posted in this thread .
Original code/demo