@xsolla/xui-slider 0.174.2 → 0.175.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +55 -0
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,6 +1,61 @@
1
1
  # Slider
2
2
 
3
3
  A cross-platform React slider component for selecting values within a range. Supports single value, range mode with two thumbs, and optional input fields for direct value entry.
4
+ <!-- BEGIN:xui-mcp-instructions:slider -->
5
+ Slider lets users set a value by dragging a thumb along a track. The filled portion of the track shows the current magnitude, giving immediate visual feedback. With Range: True the slider has two thumbs, letting users define a span between a minimum and a maximum.
6
+
7
+ ### When to use
8
+
9
+ When the user adjusts a value along a continuous or stepped scale and quick, approximate setting matters more than exact entry (volume, brightness, opacity, zoom)
10
+ - When seeing the magnitude visually helps the user judge the choice
11
+ - When filtering by a numeric range — use Range: True for a min–max span (e.g. price, age)
12
+
13
+ ### When not to use
14
+
15
+ When the user needs to enter a precise or exact number — use a numeric InputRange field instead
16
+
17
+ When the choice is a small set of discrete, named options — use a SegmentedControl or Radio buttons instead or MultiSelect
18
+ - When the control is a simple on/off — use a Switch instead
19
+ - When the value has no meaningful continuous or ordered scale
20
+
21
+ ### Content guidelines
22
+
23
+ Always pair the slider with a visible label and a readout of the current value; do not rely on the thumb position alone.
24
+
25
+ Show units in the value readout where relevant (e.g. *"70%"*, *"$1,200"*).
26
+
27
+ Display the minimum and maximum bounds when they aren't obvious, so users understand the range.
28
+
29
+ For Range: True, expose both values (lower and upper) so the selected span is always clear.
30
+
31
+ Keep the scale meaningful: choose a step that matches how precisely the user actually needs to set the value.
32
+
33
+ ### Behaviour guidelines
34
+
35
+ Setting a value — the user drags the thumb or clicks anywhere on the track; the filled portion updates to reflect the current value.
36
+
37
+ Fullness — the fill grows from the start of the track to the thumb, representing the value from 0 to 100% of the range.
38
+
39
+ Range: True — two thumbs define the span; the fill sits between them, and the thumbs cannot cross past each other.
40
+
41
+ Feedback — reflect the current value live while dragging; surface the exact value (e.g. in a tooltip or the readout) so users aren't guessing.
42
+
43
+ Disabled — the disabled state is dimmed and non-interactive; the thumb cannot be dragged or focused.
44
+
45
+ ### Accessibility
46
+
47
+ Each thumb must be keyboard-operable: arrow keys adjust by one step, and Home / End jump to the minimum and maximum.
48
+
49
+ Expose the value to assistive technology with the slider role and current, minimum, and maximum values, including a text version with units where needed.
50
+
51
+ For Range: True, make each thumb separately focusable and clearly labelled (e.g. *"Minimum"* and *"Maximum"*).
52
+
53
+ Show a visible focus indicator on the active thumb.
54
+
55
+ Never rely on the fill color alone to communicate the value — always provide a textual readout and an associated label.
56
+
57
+ Disabled sliders should not receive keyboard focus; consider a read-only presentation if the value still needs to be conveyed.
58
+ <!-- END:xui-mcp-instructions:slider -->
4
59
 
5
60
  ## Installation
6
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-slider",
3
- "version": "0.174.2",
3
+ "version": "0.175.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -13,9 +13,9 @@
13
13
  "test:coverage": "vitest run --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@xsolla/xui-core": "0.174.2",
17
- "@xsolla/xui-input": "0.174.2",
18
- "@xsolla/xui-primitives-core": "0.174.2"
16
+ "@xsolla/xui-core": "0.175.0",
17
+ "@xsolla/xui-input": "0.175.0",
18
+ "@xsolla/xui-primitives-core": "0.175.0"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": ">=16.8.0",