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

@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.1.tar.gz (455.7 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.1-py3-none-any.whl (511.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for instaui_tdesign-0.4.1.tar.gz
Algorithm Hash digest
SHA256 9a6cf2325a8b70e3bd392c8aa571b2c28722f69dc4f90c675a73981f793c0458
MD5 95ec122a89987f553d41f80bf9a9cf5e
BLAKE2b-256 4cbb4bfd7540ce26b765c4d4d0ab28f469862ab9701e9afb4de6ecb00315b6ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for instaui_tdesign-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 366e340cd08785121f56b47665b75d07f403e242f6a09125d19987bafc0fb81d
MD5 6f5c4a0d57952b5b53e111e84f14f664
BLAKE2b-256 1d880773ba9df05071366f289424dbec22865b83a1a9baa883bdfd69a626ecc4

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