Repository navigation
Hello Community!
This release brings the very much refreshed Slider, now with Jetpack Compose and SwiftUI as a native base for Android and iOS. This full rewrite allowed to provide Slider with many features, some new, some improved.
The most important and significant are:
- Fully native elements of Slider. Step markers, track and thumb are now rendered natively built-in, instead of being additional JS layer,
- More customizability. All elements can be easily replaced with customized RN components, including images.
- Simplified API. Instead of separate props, e.g. for modifying the thumb's image, there is now a single prop taking the
Thumbcomponent. The API becomes more straightforward without confusing names. - No platform differentiation. Every prop Slider has, is supported natively on every platform Slider supports. No need to check for any
Platformcolumn in README. - Two-thumbs support Slider now comes with
rangedprop turning on the two-thumbs functionality. - Native vertical orientation. Slider can now be natively rendered vertical. Of course on every both Android and iOS.
There are many benefits each of the above brings, so to get familiar with everything that got into the v6 release please check the example app, now with full README describing each example with ready code snippet.
The example app with it's README can also prove useful when using the new Slider for the first time. 👀
Namespace
With the version 6, Slider leaves the @react-native-community and is now available under @callstack organization in npm. With that, the imports of course change to import Slider from "@callstack/slider";.
Web and Windows support
Although both Web and Windows platforms are still shared by the package, not all props or implementation details are added, meaning these platforms may or may not work. This is intentional to no longer delay the mobiles release as both Web and Windows are soon to follow in upcoming releases.
In case of any issues with the Web and/or Windows platform support in v6, please use the last of v5 release.
See also
For more details around reasoning, implementation, details and more, please see the Release: version 6.0.0 - #848 Pull Request.