v0.2.3: Slider Improvements with Vertical Orientation
What's New in v0.2.3
✨ Added
- Vertical slider orientation support
- New
SliderAxisenum withHorizontalandVerticalvariants .vertical()and.horizontal()builder methods- Separate rendering logic for horizontal and vertical orientations
- Vertical sliders grow from bottom to top (0% at bottom, 100% at top)
- Adaptive thumb shape: horizontal oval for horizontal sliders, vertical oval for vertical sliders
update_from_position_vertical()method for proper vertical drag handling
- New
🐛 Fixed
- Slider thumb vertical centering
- Container height now matches thumb height for proper alignment
- Thumb positioned at
top: 0instead of calculated offset - Track perfectly centered within container using flex layout
- Thumb now sits centered on the track line instead of above it
🎨 Improved
- Slider component architecture with separate
render_horizontal()andrender_vertical()methods - Cleaner positioning logic using container dimensions matching thumb dimensions
- Better visual consistency across all slider sizes (Sm, Md, Lg)
📚 Examples
- Updated
slider_styled_demo.rswith 10 comprehensive examples- 7 horizontal slider variations demonstrating sizes, styling, and features
- 3 vertical slider examples showcasing the new orientation support
- All examples fully interactive with drag support and onChange handlers
Installation
Add to your `Cargo.toml`:
```toml
[dependencies]
adabraka-ui = "0.2.3"
```
Or install via cargo:
```bash
cargo add adabraka-ui
```
Crates.io: https://crates.io/crates/adabraka-ui/0.2.3
Documentation: https://docs.rs/adabraka-ui/0.2.3
Full Changelog: v0.2.2...v0.2.3