Composing Tuffex Interfaces
Build reviewable, screenshot-backed dashboard slices with Tuffex components
Composing Tuffex Interfaces
This guide targets Tuff / Dashboard / Admin pages. The goal is not to add more components; it is to structure a page as “actions → status → data” so users can understand state and act quickly.
Component Suites & Imports
Tuffex is organised into three suites: Basics (base), Advanced (pro) and AI (ai). Besides the full package, you can import per suite from the category entries to keep dependencies organised:
import { TxButton, TxDataTable } from '@talex-touch/tuffex/base'
import { TxCommandPalette, TxLiquid } from '@talex-touch/tuffex/pro'
import { ChatList, TxPromptBar } from '@talex-touch/tuffex/ai'
The union of the three entries is identical to the main @talex-touch/tuffex entry; styles are still loaded from @talex-touch/tuffex/style.css, or per component via each style.css. See the components overview for each component's suite.
1. Page Groups
| Group | Recommended components | Purpose |
|---|---|---|
| Actions | TxButton, TuffInput, TxSearchInput, TxSearchSelect, TuffSwitch | Search, filter, refresh, deploy, sync, and other immediate operations |
| Status | TxStatusBadge, TxTag, TxProgressBar | Review, sync, release, capacity, and quota state |
| Data | TxDataTable, TxPagination, TxEmptyState, TxSearchEmpty, TxSkeleton, TxLoadingState | Records, row selection, pagination, empty state, and loading state |
| Feedback | TxToastHost, TxTooltip, TxLoadingOverlay, TxSpinner | Task results, action hints, local blocking refreshes, and inline waits |
| Trends | Dashboard chart components | Prefer chart wrappers for trends instead of one-off SVG |
| Permission orchestration | TxTree, TxTreeSelect, TxTransfer, TxTimeline | Permission scope, owner team, resource grants, and audit progress |
| Navigation config | TxTabs, TxDropdownMenu, TxPopover, TxDrawer | Use Tabs for fixed sections, menus/popovers for lightweight actions, and Drawer for dense configuration |
| Release configuration | TxCascader, TxFlatSelect, TxSegmentedSlider, TxSlider, TxTagInput | Choose release scope, package format, rollout mode, risk tier, traffic ramp, and short tags |
2. Minimal Working Slice
Release workspace composition
A screenshot-verifiable Dashboard composition slice.
3. Search And Filter Path
Do not split “enter keyword”, “choose scope”, and “no matches” into disconnected regions. Compose TxSearchInput, TxSearchSelect, and TxSearchEmpty inside one filter container so users can see active conditions, match count, and recovery actions together.
Dashboard filter toolbar
Keyword search, scope filtering, and search-empty recovery share one path.
4. Operations Status Header
Dashboard / Admin pages should first answer “is the system healthy?”. Structure the first screen in this order:
| Layer | Components | Usage |
|---|---|---|
| Heading | Native heading + TxButton | Explain the operational scope and keep one primary refresh/deploy action on the right |
| Status | TxStatusBadge | Express state with text, not color alone |
| Metrics | TxStatCard | Use default cards for numbers and variant="progress" for health/capacity |
| Progress | TxProgressBar | Use percentage for known progress and loading for unknown-duration work |
Operations status panel
A dashboard status, metric, and progress composition for admin headers.
5. Trend Sections
Dashboard trend charts should reuse DashboardSparklineChart / DashboardMetricChart instead of page-local svg polylines. This keeps tooltip behavior, dark theme styling, ResizeObserver resizing, and empty states consistent.
Dashboard trends
A lightweight ECharts-backed sparkline wrapper.
6. Data Recovery Paths
Every data panel needs three recovery paths: loading, no data, and request failure. They should occupy the same container to avoid layout jumps and duplicated placeholders.
Dashboard recovery states
Loading, empty, and error states share one data container.
7. Data Lists And Pagination
Dashboard data regions should keep “table body, selection state, pagination, and loading placeholders” inside one workspace. The table should not own ad-hoc status copy, pagination should stay near the table footer, and longer waits should preserve space with skeletons.
Data operations panel
Table selection, pagination, and skeleton loading share one dashboard data region.
8. Task Feedback Path
Admin task feedback should split “action explanation, result notification, local blocking, and inline waiting” into separate roles: TxTooltip explains the button, TxToastHost shows short feedback, TxLoadingOverlay blocks a refreshing data block, and TxSpinner is only for short waits without percentages.
Dashboard task feedback center
A Toast / Tooltip / LoadingOverlay / Spinner composition for admin tasks.
9. Permission Orchestration Path
Admin authorization pages should first answer “which scope is being authorized?”, then “who owns it, which resources are granted, and where is the audit flow?”. Use TxTree for left-side scopes, TxTreeSelect for owner teams, TxTransfer for resource grants, and TxTimeline for audit progress.
Permission orchestration panel
A Tree / TreeSelect / Transfer / Timeline composition for admin authorization.
10. Navigation And Configuration Shell
Dashboard settings pages should first answer “which section am I in?”, then answer “what can I do here?”. Keep first-level sections in TxTabs, one-off actions in TxDropdownMenu, short explanations in TxPopover, and dense configuration in TxDrawer.
Dashboard navigation shell
A Dashboard settings composition with Tabs / DropdownMenu / Popover / Drawer.
11. Release Policy Configuration
Release configuration pages should not dump every field into one large form. Choose scope first with TxCascader, keep low-noise single choices in TxFlatSelect, put discrete risk into TxSegmentedSlider, continuous percentages into TxSlider, and keep TxTagInput limited to short metadata.
Release policy configuration
A Cascader / FlatSelect / SegmentedSlider / Slider / TagInput composition for admin release configuration.
12. Review Checklist
- One primary action: keep one highest-weight button per panel; use
secondary/ghostfor supporting actions. - Filter loop: keyword, scope filtering, match count, and no-match recovery should come from the same reactive model.
- Attached pagination: pagination must stay near the list footer and share the same filtering and selection model.
- Shared state: table selection, progress, and badges should come from the same reactive model instead of duplicated constants.
- Visible empty state: use empty-state components when no data exists; do not leave a blank table.
- Feedback roles: Toast handles short feedback, Tooltip handles short hints, LoadingOverlay blocks local refreshes, and Spinner communicates short waits.
- Authorization roles: Tree shows hierarchy, TreeSelect chooses ownership, Transfer assigns resources, and Timeline records audit history.
- Configuration layering: put short actions in menus, short notes in popovers, and long configuration in drawers; do not make one Popover carry a complex form.
- Release policy roles: Cascader owns scope, FlatSelect owns single-choice policy, SegmentedSlider owns discrete risk, Slider owns continuous ratios, and TagInput owns short metadata.
- Screenshot evidence: after adding or changing demos, open the local Tuff page and capture at least one key light/dark/mobile state.