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.6.0.tar.gz
(475.2 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.6.0.tar.gz.
File metadata
- Download URL: instaui_tdesign-0.6.0.tar.gz
- Upload date:
- Size: 475.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89e2ff23ca2a02a1b3bf0814ccac6e1140adf46d47e7e1a049c45a064347e7ee
|
|
| MD5 |
22ea5e0ea8517a014263e49d61972db4
|
|
| BLAKE2b-256 |
1143ffa3ed213342798f1af15e48b34914a739c5a51a40f4f2cfac7a0c81fcba
|
File details
Details for the file instaui_tdesign-0.6.0-py3-none-any.whl.
File metadata
- Download URL: instaui_tdesign-0.6.0-py3-none-any.whl
- Upload date:
- Size: 542.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ea0da9e1263e0b891d71d31ee48b2d862eaafe1772af28c2390f08f94e854d7
|
|
| MD5 |
00613ce941ac08d847c6da75e1fac687
|
|
| BLAKE2b-256 |
3f866d0258c4ba3a47d01fc365680fd85c520d2039d15f9492b4d58e0c47429c
|