textual-select


Nametextual-select JSON
Version 0.3.4 PyPI version JSON
download
home_pagehttps://github.com/mitosch/textual-select
SummaryA select widget (aka dropdown) for Textual.
upload_time2023-06-12 13:20:26
maintainer
docs_urlNone
authorMischa Schindowski
requires_python>=3.7,<4.0
licenseMIT
keywords textual textual select textual dropdown
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://textual.textualize.io/blog/2023/05/08/textual-0240-adds-a-select-control/).

A simple select widget (aka dropdown) for [textual](https://github.com/Textualize/textual) with an optional search field.

![select_focus](https://user-images.githubusercontent.com/922559/209305346-6b8971b1-7a3a-4424-bdf8-c439b9d74e28.png)

![select_open](https://user-images.githubusercontent.com/922559/209305349-84f39432-b1e4-405e-8854-a8d7a33230ae.png)

![select_search](https://user-images.githubusercontent.com/922559/209305352-9ad2e7c1-9dc6-435f-b1bd-8dba5f5b2642.png)


## Usage

```python
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

```bash
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

* If you are looking for an autocomplete, please refer to
  [textual-autocomplete](https://github.com/darrenburns/textual-autocomplete)
  by Darren Burns.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mitosch/textual-select",
    "name": "textual-select",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "textual,textual select,textual dropdown",
    "author": "Mischa Schindowski",
    "author_email": "mschindowski@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/23/48/4c1ad7e5190908f7b8083584e78534a79cb538d9ce38486a5c69e514b221/textual_select-0.3.4.tar.gz",
    "platform": null,
    "description": "# Textual: Select\n\nIMPORTANT: Since version 0.24.0 Textual implemented a native dropdown. I strongly\nrecommend to use the native version. This repository will slowly die. More information\nat the [Blog Post about Select control](https://textual.textualize.io/blog/2023/05/08/textual-0240-adds-a-select-control/).\n\nA simple select widget (aka dropdown) for [textual](https://github.com/Textualize/textual) with an optional search field.\n\n![select_focus](https://user-images.githubusercontent.com/922559/209305346-6b8971b1-7a3a-4424-bdf8-c439b9d74e28.png)\n\n![select_open](https://user-images.githubusercontent.com/922559/209305349-84f39432-b1e4-405e-8854-a8d7a33230ae.png)\n\n![select_search](https://user-images.githubusercontent.com/922559/209305352-9ad2e7c1-9dc6-435f-b1bd-8dba5f5b2642.png)\n\n\n## Usage\n\n```python\nfrom textual_select import Select\n\ndropdown_data = [\n    {\"value\": 0, \"text\": \"Pick-Up\"},\n    {\"value\": 1, \"text\": \"SUV\"},\n    {\"value\": 2, \"text\": \"Hatchback\"},\n    {\"value\": 3, \"text\": \"Crossover\"},\n    {\"value\": 4, \"text\": \"Convertible\"},\n    {\"value\": 5, \"text\": \"Sedan\"},\n    {\"value\": 6, \"text\": \"Sports Car\"},\n    {\"value\": 7, \"text\": \"Coupe\"},\n    {\"value\": 8, \"text\": \"Minivan\"}\n]\n\nSelect(\n    placeholder=\"please select\",\n    items=dropdown_data,\n    list_mount=\"#main_container\"\n)\n```\n\n## Installation\n\n```bash\npip install textual-select\n```\n\nRequires textual 0.11.0 or later.\n\n## Limitations\n\nThis textual widget is in early stage and has some limitations:\n\n* It needs a specific mount point (`list_mount`) where the dropdown list\n  shall appear. This is needed because the container widget with the select\n  itself could be too small. Maybe in future versions this will no longer\n  needed.\n* It can only open below, not above: Make sure to reserve space below the\n  dropdown.\n* The dropdown list has a fixed height of 5 entries. This will be configurable\n  in future versions.\n\n## Similar Widgets\n\n* If you are looking for an autocomplete, please refer to\n  [textual-autocomplete](https://github.com/darrenburns/textual-autocomplete)\n  by Darren Burns.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A select widget (aka dropdown) for Textual.",
    "version": "0.3.4",
    "project_urls": {
        "Homepage": "https://github.com/mitosch/textual-select",
        "Repository": "https://github.com/mitosch/textual-select"
    },
    "split_keywords": [
        "textual",
        "textual select",
        "textual dropdown"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9b834f1505180b391a6c9878ab1c55ed25dbd0ec838766ef776a04bffdb42ac9",
                "md5": "d50862e82f2aa55edd1fff0f7bb5f6d1",
                "sha256": "8b315dd041178f95c20000bab4358d49abae4c46fb222c9ec71eebe11d9e3a88"
            },
            "downloads": -1,
            "filename": "textual_select-0.3.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d50862e82f2aa55edd1fff0f7bb5f6d1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 6908,
            "upload_time": "2023-06-12T13:20:25",
            "upload_time_iso_8601": "2023-06-12T13:20:25.501913Z",
            "url": "https://files.pythonhosted.org/packages/9b/83/4f1505180b391a6c9878ab1c55ed25dbd0ec838766ef776a04bffdb42ac9/textual_select-0.3.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "23484c1ad7e5190908f7b8083584e78534a79cb538d9ce38486a5c69e514b221",
                "md5": "707d172eb2a29c5b59ae60eea689cf85",
                "sha256": "ae6767bb9078d2e451caf8f1606785cc9e99037f509a714942fe15660aeaa3e3"
            },
            "downloads": -1,
            "filename": "textual_select-0.3.4.tar.gz",
            "has_sig": false,
            "md5_digest": "707d172eb2a29c5b59ae60eea689cf85",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 6173,
            "upload_time": "2023-06-12T13:20:26",
            "upload_time_iso_8601": "2023-06-12T13:20:26.779046Z",
            "url": "https://files.pythonhosted.org/packages/23/48/4c1ad7e5190908f7b8083584e78534a79cb538d9ce38486a5c69e514b221/textual_select-0.3.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-12 13:20:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mitosch",
    "github_project": "textual-select",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "textual-select"
}
        
Elapsed time: 0.07863s