Skip to main content

Tests Completion Status Coverage Status Supported Python Versions is support

Textual Thin Slider

A thin slider widget for the Textual UI platform. The thin slider widget is only 1 character tall and allows fine control to choose a value within a range. Options include, no value display, percentage or value. Value may displayed on left or right of slider bar.

Slider w/Percent

Installation

pip install thin-textual-slider
uv add thin-textual-slider

Usage

Display Option Enum and Widget Control Arguments

class ThinSliderDisplayOptions(IntEnum):
    """ How should we show values with the slider bar, use bitwise and/or to set/read values. """
    none = 0  # Do not display the percentage or value (default)
    display_left = 1  # Display percentage/value to the left of the slider bar
    display_right = 2  # Display percentage/value to the right of the slider bar 
    show_value = 4  # Show current slider value instead of percentage

class ThinSlider(
    range_min: int,
    range_max: int,
    value: int,
    step: int,
    display_type: ThinSliderDisplayOptions
)

# Programmatically change slider value
slider.value = {new integer value}

Example: Textual App Usage With Event Message

from textual import on
from textual.app import ComposeResult, App
from textual_thin_slider import ThinSlider, ThinSliderDisplayOptions

class SimpleSliderApp(App):
    slider_value: int = 0
    slider_percentage: float = 0.0

    def compose(self) -> ComposeResult:
        yield ThinSlider(
            id="test-slider",
            range_min=0,
            range_max=250,
            display_type=ThinSliderDisplayOptions.display_right | ThinSliderDisplayOptions.show_value
        )

    @on(ThinSlider.Changed, "#test-slider")
    def on_thin_slider_changed(self, event: ThinSlider.Changed) -> None:
        self.slider_value = event.value
        self.slider_percentage = event.control.percent

if __name__ == "__main__":
    app = SimpleSliderApp()
    app.run()

Metadata

Release files for textual-thin-slider 1.0.1

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-thin-slider 1.0.1
File Size Uploaded Provenance Actions
textual_thin_slider-1.0.1.tar.gz 9.3 kB Without provenance Details for textual_thin_slider-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for textual-thin-slider 1.0.1
File Interpreter ABI Platform Actions
textual_thin_slider-1.0.1-py3-none-any.whl Python 3 none any Details for textual_thin_slider-1.0.1-py3-none-any.whl

Total release size: 16.6 kB

Release files / textual_thin_slider-1.0.1.tar.gz

Download URL textual_thin_slider-1.0.1.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
489ae2c1338b6970333bcc2419f925db7e0852721e1a47f0e620af791712b2a4
BLAKE2b-256 checksum
How to use checksums
bc4c5ee5b6d2b97d29c812b9683160f16ffa9a0f6b69078a97d6645c012c484a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / textual_thin_slider-1.0.1-py3-none-any.whl

Download URL textual_thin_slider-1.0.1-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f5437b0dc40b401a58b252b5d9f72fa194dd37ce7648ed99d2b11f2d702b872
BLAKE2b-256 checksum
How to use checksums
cb5b79c54a223e00f2b6d8f182624551c645be62ed3879fe997933b35be58778
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for textual-thin-slider 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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