New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

textual-select

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textual-select

A select widget (aka dropdown) for Textual.

  • 0.3.4
  • PyPI
  • Socket score

Maintainers
1

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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc