Overview
A dynamic balance slider component featuring adjustable colors, customizable limits, and an interactive tooltip. Perfect for creating intuitive balance controls with visual feedback.Usage
Props
| Prop Name | Type | Default | Description |
|---|---|---|---|
initialValue | number | 50 | Initial position of the slider (0-100). |
leftColor | string | "#e68a00" | Background color for the left side of the slider. |
rightColor | string | "#ffffff" | Background color for the right side of the slider. |
minShiftLimit | number | 40 | Minimum limit where shifting animation activates. |
maxShiftLimit | number | 68 | Maximum limit where shifting animation deactivates. |
leftContent | string | "LEFT" | Text displayed in the tooltip for the left side. |
rightContent | string | "RIGHT" | Text displayed in the tooltip for the right side. |
indicatorColor | string | "#FFFFFF" | Color of the central indicator on the slider. |
Credits
- Inspired and ported from code shared in Jhey’s CSS only version of Balance Slider
- Original concept by Malay Vasa