JSPM

  • Created
  • Published
  • Downloads 95852
  • Score
    100M100P100Q195499F
  • License MIT

An eco friendly alternative to gas powered slider components

Package Exports

  • react-compound-slider

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-compound-slider) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-compound-slider

Under heavy development.

The main idea of this library starts from an observation that slider components are really just a relatively positioned outer div with elements absolutely positioned inside by a percentage. In this library the Handles, Tracks, and Ticks components are used as children to the Slider component and they let you tap into a stream of values and percentages that you can then render using your own components.

This is a compound component approach to creating sliders that separates the logic from the actual presentation. In practical terms this means you can create just about any kind of slider you can imagine and use whatever style approach you want. The library also has nothing to do with markup. You can render whatever markup you want. The Slider just streams you the data and really only cares about the dimensions of the outer div where it takes its measurements from.