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
from instaui_tdesign import 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
Release history Release notifications | RSS feed
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.5.1.tar.gz
(469.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file instaui_tdesign-0.5.1.tar.gz.
File metadata
- Download URL: instaui_tdesign-0.5.1.tar.gz
- Upload date:
- Size: 469.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a731eda228414a04d9f855670e5731ec7e67777e5805023875567321c32e0cc
|
|
| MD5 |
450c1631c0109968fb9b905c44eff305
|
|
| BLAKE2b-256 |
98491b2650b9f4ff7c1270a03f0f31dc1bc9f1bcc264934409ea1754447b8a0e
|
File details
Details for the file instaui_tdesign-0.5.1-py3-none-any.whl.
File metadata
- Download URL: instaui_tdesign-0.5.1-py3-none-any.whl
- Upload date:
- Size: 537.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b5a392c32c6c455c68cb1946d6ee0e567277da0971af6a82a382ad206808141
|
|
| MD5 |
2dadedd3d120a7f3545aadca53bd5990
|
|
| BLAKE2b-256 |
2e9ba8dbaa07752b0576c55c5ea87c0c64b0ef4235fe7f5f6366b85831110958
|