Skip to main content

InstaUI TDesign

Project description

instaui-tdesign

English|简体中文

📖 Introduction instaui-tdesign is a UI component library for InstaUI, built on top of TDesign.

📦 Installation

pip install instaui-tdesign -U
uv add instaui-tdesign

🖥️ Quick Start

from instaui import ui
import instaui_tdesign as td

td.use(locale="en-US")

@ui.page('/')
def home():
    info = ui.state(
        {
            "name": "",
            "age": 0,
        }
    )

    @ui.computed(inputs=[info])
    def disabled_submit(info: dict) -> bool:
        return info["name"] == "" or info["age"] == 0

    @ui.event(inputs=[info])
    def handle_submit(info: dict):
        # Operations such as printing, writing to a database, etc.
        print(info)

    # ui
    with ui.container(size="1"), ui.column():
        ui.text(info)

        td.input(info["name"], label="NAME")
        td.input_number(info["age"], label="AGE", theme="row", min=0, max=100)
        td.button("submit", disabled=disabled_submit, on_click=handle_submit)

ui.server(debug=True).run()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

instaui_tdesign-0.4.5.tar.gz (469.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

instaui_tdesign-0.4.5-py3-none-any.whl (536.2 kB view details)

Uploaded Python 3

File details

Details for the file instaui_tdesign-0.4.5.tar.gz.

File metadata

  • Download URL: instaui_tdesign-0.4.5.tar.gz
  • Upload date:
  • Size: 469.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for instaui_tdesign-0.4.5.tar.gz
Algorithm Hash digest
SHA256 3e9ab645ed6f9a668c94bcfd5cf2218c9a9a3c76a94fe708b1fd50c41e2f7d16
MD5 cbff25298d380e30500940870d393b52
BLAKE2b-256 79f240c8b8a37a31213db05b104d175312afc4167afb2add07963cb1fd75865a

See more details on using hashes here.

File details

Details for the file instaui_tdesign-0.4.5-py3-none-any.whl.

File metadata

File hashes

Hashes for instaui_tdesign-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 209b66b5a0f17875d681b039a06fc9fd8db8ab0b1d6323400fa3b0cbbaaefc99
MD5 f6a4aa8e8d7bc04600216af8d06d926b
BLAKE2b-256 3c5b20ec8ec481ee93c4ebc2b06ac910e73d0ecf7fc46124158a3569cd1ffd66

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page