Components/Tuffex Components
VerifiedUniversal Component

Tuffex Components

Component documentation hub for Tuffex

Tuffex Components

Component docs are now unified with TuffDemoWrapper + standalone demo components.

Preview

Demo will load when visible.
<template>
  <div class="tuff-demo-row">
    <TxButton size="sm">Action</TxButton>
    <TuffSwitch :model-value="true" />
    <TxStatusBadge text="Online" status="success" />
    <TxTag label="Focus" />
    <TxProgressBar :percentage="62" style="width: 140px;" />
  </div>
</template>

Composed Workspace Demo

This demo validates component composition in a realistic admin slice: search input, switch, button, status badges, progress, and selectable table work together in one responsive panel.

Release workspace

A practical baseline for Dashboard / Admin component composition.

Demo will load when visible.
<script setup lang="ts">
import { ref } from 'vue'

const query = ref('')
const selectedKeys = ref([1])
const automationEnabled = ref(true)
</script>

<template>
  <section class="workflow-panel">
    <header>
      <h3>Release workspace</h3>
      <TxButton variant="primary" size="sm" icon="i-carbon-rocket">Deploy</TxButton>
    </header>
    <TuffInput v-model="query" placeholder="Search tasks" prefix-icon="i-carbon-search" clearable />
    <TuffSwitch v-model="automationEnabled" />
    <TxProgressBar :percentage="84" status="success" show-text />
    <TxStatusBadge text="Reviewing" status="warning" />
    <TxDataTable v-model:selected-keys="selectedKeys" :columns="columns" :data="rows" row-key="id" selectable />
  </section>
</template>

Dashboard trends

Reuse DashboardSparklineChart instead of page-local SVG sparklines.

Demo will load when visible.
<script setup lang="ts">
import DashboardSparklineChart from '~/components/dashboard/DashboardSparklineChart.client.vue'
</script>

<template>
  <DashboardSparklineChart
    :values="[18, 24, 21, 36, 42, 38, 54]"
    :labels="['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']"
    color="var(--tx-color-primary, #409eff)"
    show-grid
  />
</template>

Operations status panel

Compose StatCard, StatusBadge, ProgressBar, and Switch into a dashboard status header.

Demo will load when visible.
<template>
  <section class="grid gap-3">
    <TxStatCard
      variant="progress"
      value="99.9%"
      label="API availability"
      meta="Normal"
      :progress="99"
      icon-class="i-carbon-cloud-monitoring text-[var(--tx-color-success)]"
    />
    <TxStatusBadge text="Review done" status="success" size="sm" />
    <TxProgressBar :percentage="86" status="success" show-text />
  </section>
</template>

Dashboard recovery states

Place LoadingState, EmptyState, and ErrorState in one data container for loading/no-data/failure paths.

Demo will load when visible.
<template>
  <section class="grid gap-3">
    <TxLoadingState title="Loading rules" surface="card" />
    <TxEmptyState variant="no-data" title="No automation rules yet" surface="card" />
    <TxErrorState title="Rules failed to load" surface="card" />
  </section>
</template>

Dashboard task feedback center

Compose Toast, Tooltip, LoadingOverlay, and Spinner into one admin feedback path.

Demo will load when visible.
<script setup lang="ts">
import { toast } from '@talex-touch/tuffex/utils'
import { ref } from 'vue'

const syncing = ref(true)
</script>

<template>
  <section class="grid gap-3">
    <TxToastHost />
    <TxTooltip content="Tooltip explains the current action only.">
      <TxButton @click="toast({ title: 'Sync task queued', duration: 0 })">Send toast</TxButton>
    </TxTooltip>
    <TxLoadingOverlay :loading="syncing" text="Refreshing task queue…">
      <TxSpinner :size="16" />
    </TxLoadingOverlay>
  </section>
</template>

Dashboard filter toolbar

Compose SearchInput, SearchSelect, and SearchEmpty into one list-filtering and no-match recovery path.

Demo will load when visible.
<script setup lang="ts">
import { computed, ref } from 'vue'

const query = ref('')
const selectedScope = ref<string | number>('all')
const scopeOptions = [
  { value: 'all', label: 'All' },
  { value: 'docs', label: 'Docs' },
  { value: 'tasks', label: 'Tasks' },
]
const filteredRecords = computed(() => (query.value ? [] : scopeOptions))
</script>

<template>
  <section class="grid gap-3">
    <TxSearchInput v-model="query" remote placeholder="Search plugins / docs / tasks" />
    <TxSearchSelect v-model="selectedScope" :options="scopeOptions" placeholder="Filter scope" />
    <TxSearchEmpty v-if="!filteredRecords.length" surface="card" />
  </section>
</template>

Data operations panel

Compose DataTable, Pagination, Skeleton, and LayoutSkeleton into one dashboard data region.

Demo will load when visible.
<template>
  <section class="grid gap-3">
    <TxDataTable :columns="columns" :data="pagedRows" row-key="id" selectable />
    <TxPagination v-model:current-page="page" :total="rows.length" :page-size="4" show-info />
    <TxSkeleton :loading="true" :lines="3" />
  </section>
</template>

Permission orchestration panel

Compose Tree, TreeSelect, Transfer, and Timeline into one admin authorization workflow.

Demo will load when visible.
<script setup lang="ts">
import { ref } from 'vue'

const selectedScope = ref<string | number>('release')
const ownerTeam = ref<string | number | undefined>('docs')
const assignedKeys = ref<Array<string | number>>(['read-docs'])
</script>

<template>
  <section class="grid gap-3">
    <TxTree v-model="selectedScope" :nodes="scopeNodes" />
    <TxTreeSelect v-model="ownerTeam" :nodes="teamNodes" placeholder="Owner team" />
    <TxTransfer v-model="assignedKeys" :data="resources" />
    <TxTimeline>
      <TxTimelineItem title="Assign resources" time="10:20" color="success" active />
    </TxTimeline>
  </section>
</template>

Release policy configuration

Compose Cascader, FlatSelect, SegmentedSlider, Slider, and TagInput into one admin release configuration flow.

Demo will load when visible.
<script setup lang="ts">
import { ref } from 'vue'

const releasePath = ref(['desktop', 'stable', 'macos'])
const packageFormat = ref('signed')
const rolloutMode = ref('phased')
const riskLevel = ref(2)
const traffic = ref(35)
const labels = ref(['nexus', 'verified'])
const scopeOptions = [
  {
    value: 'desktop',
    label: 'Desktop',
    children: [
      {
        value: 'stable',
        label: 'Stable',
        children: [{ value: 'macos', label: 'macOS', leaf: true }],
      },
    ],
  },
]
const riskSegments = [
  { value: 1, label: 'Low' },
  { value: 2, label: 'Med' },
  { value: 3, label: 'High' },
  { value: 4, label: 'Freeze' },
]
</script>

<template>
  <section class="grid gap-3">
    <TxCascader v-model="releasePath" :options="scopeOptions" placeholder="Release scope" />
    <TxFlatSelect v-model="packageFormat" placeholder="Package format">
      <TxFlatSelectItem value="signed" label="Signed build" />
    </TxFlatSelect>
    <TxFlatSelect v-model="rolloutMode" placeholder="Rollout mode">
      <TxFlatSelectItem value="phased" label="Phased" />
    </TxFlatSelect>
    <TxSegmentedSlider v-model="riskLevel" :segments="riskSegments" />
    <TxSlider v-model="traffic" :min="5" :max="100" :step="5" show-value />
    <TxTagInput v-model="labels" placeholder="Press Enter to add tags" />
  </section>
</template>

Dashboard navigation shell

Compose Tabs, DropdownMenu, Popover, and Drawer into a dashboard settings shell.

Demo will load when visible.
<template>
  <section class="grid gap-3">
    <TxDropdownMenu>
      <template #trigger>
        <TxButton>Release actions</TxButton>
      </template>
      <TxDropdownItem>Quick release</TxDropdownItem>
    </TxDropdownMenu>
    <TxPopover>
      <template #reference>
        <TxButton variant="secondary">Policy notes</TxButton>
      </template>
      Keep popovers short and action-light.
    </TxPopover>
    <TxTabs placement="left" indicator-variant="pill">
      <TxTabItem name="Overview" activation>Overview settings</TxTabItem>
    </TxTabs>
    <TxDrawer :visible="false" title="Release policy" />
  </section>
</template>

Tutorial Path

  • Start with Composing Tuffex interfaces to learn the “actions → status → data” page structure.
  • Start dashboard headers from the “Operations status panel” pattern, then expand into tables, trend charts, navigation settings, and detail drawers.
  • For list pages, keep keyword search, scope filtering, and no-match recovery in one path with TxSearchInput, TxSearchSelect, and TxSearchEmpty.
  • For data lists, use TxDataTable for the main body, TxPagination for navigation, and TxSkeleton / TxLayoutSkeleton for waiting states.
  • For settings pages and admin shells, use TxTabs for fixed sections, TxDropdownMenu / TxPopover for lightweight actions and short notes, and TxDrawer for dense configuration.
  • Data regions must design loading, empty, and error recovery paths together; prefer TxLoadingState, TxEmptyState, and TxErrorState.
  • Task feedback paths should mount TxToastHost for notifications, use TxTooltip for action hints, TxLoadingOverlay for local blocking refreshes, and TxSpinner for inline waiting.
  • Permission orchestration paths should use TxTree for scope, TxTreeSelect for owner team, TxTransfer for resource grants, and TxTimeline for audit progress.
  • Release configuration paths should use TxCascader for release scope, TxFlatSelect for package and rollout choices, TxSegmentedSlider for risk tiers, TxSlider for traffic ramps, and TxTagInput for short metadata.
  • Use the grouped component list below for detail pages; the sidebar only highlights migration states that still need attention, while reviewed pages are marked as Verified in the sync dashboard.
  • Dashboard pages should compose TxDataTable, TxStatusBadge, TxProgressBar, and chart components instead of hand-writing one-off SVG/status UI.

Migration Dashboard

  • In progress: this page is still being edited; demos/API may change.
  • AI migrated: migration is complete, but source-code verification is recommended.
  • Reviewed: manually reviewed.
ComponentSync Status
Agents— Not migrated
Alert— Not migrated
AutoSizer— Not migrated
Avatar— Not migrated
Avatar Variants— Not migrated
Badge— Not migrated
BaseAnchor— Not migrated
BaseSurface— Not migrated
BlankSlate— Not migrated
Breadcrumb— Not migrated
Button— Not migrated
Card— Not migrated
CardItem— Not migrated
Cascader— Not migrated
Chat— Not migrated
ChatComposer— Not migrated
Checkbox— Not migrated
CodeEditor— Not migrated
Collapse— Not migrated
CommandPalette— Not migrated
Container— Not migrated
ContextMenu— Not migrated
CornerOverlay— Not migrated
DataTable— Not migrated
DatePicker— Not migrated
Design Foundations— Not migrated
Dialog— Not migrated
Divider— Not migrated
Drawer— Not migrated
DropdownMenu— Not migrated
EdgeFadeMask— Not migrated
Empty— Not migrated
EmptyState— Not migrated
ErrorState— Not migrated
FileUploader— Not migrated
FlatButton— Not migrated
FlatInput— Not migrated
FlatRadio— Not migrated
FlatSelect— Not migrated
Flex— Not migrated
FlipOverlay— Not migrated
Floating— Not migrated
Form— Not migrated
Fusion— Not migrated
GlassSurface— Not migrated
GlowText— Not migrated
GradientBorder— Not migrated
GradualBlur— Not migrated
Grid— Not migrated
GridLayout— Not migrated
GroupBlock— Not migrated
GuideState— Not migrated
Icon— Not migrated
ImageGallery— Not migrated
ImageUploader— Not migrated
Input— Not migrated
KeyframeStrokeText— Not migrated
LayoutSkeleton— Not migrated
LoadingOverlay— Not migrated
LoadingState— Not migrated
MarkdownView Markdown— Not migrated
Modal— Not migrated
NavBar— Not migrated
NoData— Not migrated
NoSelection— Not migrated
OfflineState— Not migrated
OutlineBorder— Not migrated
Pagination— Not migrated
PermissionState— Not migrated
Picker— Not migrated
Popover— Not migrated
Progress— Not migrated
ProgressBar— Not migrated
Radio— Not migrated
Rating— Not migrated
Scroll— Not migrated
SearchEmpty— Not migrated
SearchInput— Not migrated
SearchSelect— Not migrated
SegmentedSlider— Not migrated
Select— Not migrated
Skeleton— Not migrated
Slider— Not migrated
SortableList— Not migrated
Spinner— Not migrated
Splitter— Not migrated
Stack— Not migrated
Stagger— Not migrated
StatCard— Not migrated
StatusBadge— Not migrated
Steps— Not migrated
Switch— Not migrated
TabBar— Not migrated
Tabs— Not migrated
Tag— Not migrated
TagInput— Not migrated
TextTransformer— Not migrated
Timeline— Not migrated
Toast— Not migrated
Tooltip— Not migrated
Transfer— Not migrated
Transition— Not migrated
Tree— Not migrated
TreeSelect— Not migrated
TuffLogoStroke— Not migrated
TypingIndicator— Not migrated
VirtualList— Not migrated

Chapter Overview

ChapterCore ScopeStatus
Design PatternsSurface / Motion / composition styles✅ migrated
Design CasesReal scenarios and composed UI patterns✅ migrated
Dark Mode & ThemeTokens, light/dark, and theme constraints✅ migrated
Basics & ActionsButton / Icon / Avatar / Tag✅ migrated
Forms & InputInput / Select / Form / Uploader✅ migrated
Feedback & StatesDialog / Toast / Progress / Empty✅ migrated
Layout & NavigationGrid / Container / Tabs / Menu✅ migrated
Data & ListsDataTable / Tree / VirtualList✅ migrated
Content & MediaChat / Markdown / Image✅ migrated

Design Patterns

Design Cases

Dark Mode & Theme

Basics & Actions

Forms & Input

Feedback & States

Layout & Navigation

Data & Lists

Content & Media