Skip to main content

textual-slider

A Textual widget for a simple slider.

screenshot

Installation

Install textual-slider using pip:

pip install textual-slider

Usage

textual-slider provides a simple Slider widget for use in Textual, that allows selecting an integer value within a given range.

The initial value of the slider if not specified is the minimum value. You can also optionally specify a step size between valid values.

yield Slider(0, 10)

yield Slider(min=200, max=500, step=100, value=300)

You can find more complete usage examples of the Slider widget in the /examples/ directory of this repo.

Limitations

Textual apps run in the terminal, which work in terms of character cells rather than pixels. This means you obviously can't have the same fine-grained control for this slider as usual, depending on the size of the slider range and the styled width.

Currently this slider widget only works with integer values. Any suggestions for how to work with floating point values would be welcome!

Contributing

I created this simple slider widget as a learning exercise to better understand Textual and it is still a work in progress.

I'd really appreciate any feedback or suggestions, but I'm afraid I probably won't be accepting any PRs at the moment.

Licence

Licensed under the GNU General Public License v3.0.

Metadata

Release files for textual-slider 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for textual-slider 0.2.0
File Size Uploaded
textual_slider-0.2.0.tar.gz 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for textual-slider 0.2.0
File Interpreter ABI Platform
textual_slider-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.6 kB

Release files / textual_slider-0.2.0.tar.gz

Download URL textual_slider-0.2.0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cdf28cc764ff1163a2f03655a31253a2c4b4966ddff3d0de53c4df10593277c7
BLAKE2b-256 checksum
How to use checksums
40aa2019bbb5218e4c3461248281cef0a1dbc827995ba940a6fb1f929e34725d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / textual_slider-0.2.0-py3-none-any.whl

Download URL textual_slider-0.2.0-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e36f33bae5cfe968deeb5c61880c76c6a66448ee733683bd74d73c93825d4e6
BLAKE2b-256 checksum
How to use checksums
23f39faea1513c81a1efd9c16f71ed1d72e6645032d07c82b3b01f1967e2d6fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page