Skip to main content

Textual: Select

IMPORTANT: Since version 0.24.0 Textual implemented a native dropdown. I strongly recommend to use the native version. This repository will slowly die. More information at the Blog Post about Select control.

A simple select widget (aka dropdown) for textual with an optional search field.

select_focus

select_open

select_search

Usage

from textual_select import Select

dropdown_data = [
    {"value": 0, "text": "Pick-Up"},
    {"value": 1, "text": "SUV"},
    {"value": 2, "text": "Hatchback"},
    {"value": 3, "text": "Crossover"},
    {"value": 4, "text": "Convertible"},
    {"value": 5, "text": "Sedan"},
    {"value": 6, "text": "Sports Car"},
    {"value": 7, "text": "Coupe"},
    {"value": 8, "text": "Minivan"}
]

Select(
    placeholder="please select",
    items=dropdown_data,
    list_mount="#main_container"
)

Installation

pip install textual-select

Requires textual 0.11.0 or later.

Limitations

This textual widget is in early stage and has some limitations:

  • It needs a specific mount point (list_mount) where the dropdown list shall appear. This is needed because the container widget with the select itself could be too small. Maybe in future versions this will no longer needed.
  • It can only open below, not above: Make sure to reserve space below the dropdown.
  • The dropdown list has a fixed height of 5 entries. This will be configurable in future versions.

Similar Widgets

Metadata

Release files for textual-select 0.3.4

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-select 0.3.4
File Size Uploaded Provenance Actions
textual_select-0.3.4.tar.gz 6.2 kB Without provenance Details for textual_select-0.3.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for textual-select 0.3.4
File Interpreter ABI Platform Actions
textual_select-0.3.4-py3-none-any.whl Python 3 none any Details for textual_select-0.3.4-py3-none-any.whl

Total release size: 13.1 kB

Release files / textual_select-0.3.4.tar.gz

Download URL textual_select-0.3.4.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ae6767bb9078d2e451caf8f1606785cc9e99037f509a714942fe15660aeaa3e3
BLAKE2b-256 checksum
How to use checksums
23484c1ad7e5190908f7b8083584e78534a79cb538d9ce38486a5c69e514b221
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.10.6 Linux/5.19.0-43-generic

Release files / textual_select-0.3.4-py3-none-any.whl

Download URL textual_select-0.3.4-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b315dd041178f95c20000bab4358d49abae4c46fb222c9ec71eebe11d9e3a88
BLAKE2b-256 checksum
How to use checksums
9b834f1505180b391a6c9878ab1c55ed25dbd0ec838766ef776a04bffdb42ac9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.10.6 Linux/5.19.0-43-generic

Security for textual-select 0.3.4

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.

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