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
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.4.4.tar.gz
(468.4 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.4.4.tar.gz.
File metadata
- Download URL: instaui_tdesign-0.4.4.tar.gz
- Upload date:
- Size: 468.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfd5e8dc272d907871902ec19768a1cb628284189ae25d69e4e7299da626ce4a
|
|
| MD5 |
352066ed2e074c4852ee04108a947460
|
|
| BLAKE2b-256 |
64cb22489f3faeb9ce8ba6cc0d9f75380a16476e1af1777e247ad4001b62914c
|
File details
Details for the file instaui_tdesign-0.4.4-py3-none-any.whl.
File metadata
- Download URL: instaui_tdesign-0.4.4-py3-none-any.whl
- Upload date:
- Size: 535.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
903924afac3d547a71738ba1966c7a38fbeb4e61c28c31cc0ebd4f86741bc4bf
|
|
| MD5 |
a6149914b527cda6b0ab3a0bd0a92fb8
|
|
| BLAKE2b-256 |
0657a250e22fd99e3cd47bccd91fbe9a4f124f065b508aa8361d6df88441bd99
|