Docs/Composing Tuffex Interfaces

Composing Tuffex Interfaces

Build reviewable, screenshot-backed dashboard slices with Tuffex components

VerifiedUniversal Developer

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

GroupRecommended componentsPurpose
ActionsTxButton, TuffInput, TxSearchInput, TxSearchSelect, TuffSwitchSearch, filter, refresh, deploy, sync, and other immediate operations
StatusTxStatusBadge, TxTag, TxProgressBarReview, sync, release, capacity, and quota state
DataTxDataTable, TxPagination, TxEmptyState, TxSearchEmpty, TxSkeleton, TxLoadingStateRecords, row selection, pagination, empty state, and loading state
FeedbackTxToastHost, TxTooltip, TxLoadingOverlay, TxSpinnerTask results, action hints, local blocking refreshes, and inline waits
TrendsDashboard chart componentsPrefer chart wrappers for trends instead of one-off SVG
Permission orchestrationTxTree, TxTreeSelect, TxTransfer, TxTimelinePermission scope, owner team, resource grants, and audit progress
Navigation configTxTabs, TxDropdownMenu, TxPopover, TxDrawerUse Tabs for fixed sections, menus/popovers for lightweight actions, and Drawer for dense configuration
Release configurationTxCascader, TxFlatSelect, TxSegmentedSlider, TxSlider, TxTagInputChoose 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.

Loading demo...

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.

Loading demo...

4. Operations Status Header

Dashboard / Admin pages should first answer “is the system healthy?”. Structure the first screen in this order:

LayerComponentsUsage
HeadingNative heading + TxButtonExplain the operational scope and keep one primary refresh/deploy action on the right
StatusTxStatusBadgeExpress state with text, not color alone
MetricsTxStatCardUse default cards for numbers and variant="progress" for health/capacity
ProgressTxProgressBarUse percentage for known progress and loading for unknown-duration work

Operations status panel

A dashboard status, metric, and progress composition for admin headers.

Loading demo...

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.

Loading demo...

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.

Loading demo...

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.

Loading demo...

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.

Loading demo...

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.

Loading demo...

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.

Loading demo...

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.

Loading demo...

12. Review Checklist

  • One primary action: keep one highest-weight button per panel; use secondary / ghost for 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.

13. Continue Reading