Repository navigation
ResourceBoard
oldmangan edited this page Oct 6, 2026
·
1 revision
A master/detail browser: a selectable list on the left, a templated detail pane on the right.
from wapyt import ResourceBoardConfig, ResourceItem
board = self.add_resourceboard("users", ResourceBoardConfig(
title="Users",
add_button_text="Invite",
list_width=280,
detail_template="<h2>{title}</h2><p>{subtitle}</p><p>Role: {role}</p>",
items=[ResourceItem(id="u1", title="Ada", subtitle="ada@example.com",
status="active", extra={"role": "admin"})],
))
board.on_select(lambda p: load_detail(p["id"]))
board.on_add(new_user)detail_template placeholders come from the item and its extra. Values are
HTML-escaped. A key ending in Html ({modelsHtml}) is inserted raw; use it
only for markup you built and escaped yourself.
ResourceItem(id, title, subtitle, status, badge, extra).
ResourceBoardConfig(items, selected_id, list_width, add_button_text, detail_template, empty_state, title).
Events: on_select → {id, item}, on_add → —, on_action → {action, item, id, data}. Methods: set_items, select.
wapyt is MIT-licensed · Repository · pyTincture · Issues
Getting started
Widgets
- Layout and MainWindow
- Tree
- DataTable
- Form
- ModalWindow
- Window
- TabWidget
- Toolbar
- Sidebar
- Chat
- Terminal
- CardPanel
- ResourceBoard
- File Transfer
- Message
- ContextMenu
- MenuBar
- Listbox
- Kanban
- ProgressBar
- Pagination
- Popup and tooltips
- Chart
- Scheduler
- MediaPlayer
Guides
Planning
Contributing