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.3.tar.gz
(457.0 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.3.tar.gz.
File metadata
- Download URL: instaui_tdesign-0.4.3.tar.gz
- Upload date:
- Size: 457.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
756573f42b122791fce75d27355988b6274e608e521d24c9967cace97d5a908c
|
|
| MD5 |
2566c2aff61388c00d50c82737f9a7a4
|
|
| BLAKE2b-256 |
58d54f87bb7de6a18779f630e37f751f73c71f62a77f3b702b63bbe9d2a33070
|
File details
Details for the file instaui_tdesign-0.4.3-py3-none-any.whl.
File metadata
- Download URL: instaui_tdesign-0.4.3-py3-none-any.whl
- Upload date:
- Size: 514.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc254840bc3180eb8de812f125cde95c407cf0770419a5144e8a75a9ae4fd01b
|
|
| MD5 |
aca24f74b6209682810313ff8ec4ee13
|
|
| BLAKE2b-256 |
f87d798142ce01eccfe7d83fd3bc2f2d028bcac09fb7229a3f6f2c18518c1d82
|