Misleading range_slider value labels
Author: yairchuCreated Sep 15, 2026Updated Sep 16, 2026
Labelsbug
Describe the bug
With the following example: mo.ui.range_slider(0, 10, 0.01, (1.2, 1.500000000000001), full_width=True), a hover on the slider shows only the right value:
It can also sporadically happen when starting with round numbers (1.2, 1.5) and dragging the range. The resulting floating point often has a ...0000001 decimal suffix and if only one of the edges has it, it will completely cover the other edge's label.
A solution to this problem can either be appropriate rounding, adding spacing between the labels, or staggered rows.
Will you submit a PR?
- Yes
Environment
{
"marimo": "0.24.2",
"editable": false,
"location": "/Users/yairchu/dev/undersampled_add_sub/.venv/lib/python3.13/site-packages/marimo",
"OS": "Darwin",
"OS Version": "25.6.0",
"Processor": "arm",
"Python Version": "3.13.2",
"Locale": "en_US",
"Binaries": {
"Browser": "140.0.7339.134",
"Node": "v23.11.0",
"uv": "0.11.16 (135a36367 2026-05-21 aarch64-apple-darwin)"
},
"Dependencies": {
"click": "8.5.0",
"docutils": "0.23",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.10.3",
"narwhals": "2.26.0",
"packaging": "26.3",
"psutil": "7.2.2",
"pygments": "2.21.0",
"pymdown-extensions": "11.0.2",
"pyyaml": "6.0.3",
"starlette": "1.6.0",
"tomlkit": "0.15.1",
"typing-extensions": "4.16.0",
"uvicorn": "0.52.4",
"websockets": "17.1"
},
"Optional Dependencies": {
"anywidget": "0.11.0",
"loro": "1.13.2",
"mcp": "2.2.0",
"nbformat": "5.11.1",
"openai": "3.13.0",
"pandas": "3.0.5",
"python-lsp-ruff": "2.3.4",
"python-lsp-server": "1.15.0",
"ruff": "0.16.7",
"ty": "0.0.80"
},
"Experimental Flags": {}
}
Code to reproduce
mo.ui.range_slider(0, 10, 0.01, (1.2, 1.500000000000001), full_width=True)
Source: marimo-team/marimo