Docs/TuffEx

TuffEx

Modern Vue3 component library with beautiful animations

Universal Developer

TuffEx

TuffEx (Chinese name: Ta Fu) is a modern Vue3 component library focused on tactile experience and smooth animations. It's part of the Tuff ecosystem and provides beautiful, interactive UI components.

Migration in Progress - TuffEx is migrating components from Tuff core app. Tech stack upgraded to Vue 3.5 / Vite 6 / TypeScript 5.8.

Installation

EXAMPLE.BASH
# npm
npm install @talex-touch/tuffex

# yarn
yarn add @talex-touch/tuffex

# pnpm (recommended)
pnpm add @talex-touch/tuffex

Quick Start

Full Import (Legacy)

EXAMPLE.TYPESCRIPT
import { createApp } from 'vue'
import TuffUI from '@talex-touch/tuffex'
import '@talex-touch/tuffex/style.css'

const app = createApp(App)
app.use(TuffUI)
app.mount('#app')

Use the full import only for migration work where the application already expects every component style to be present. New pages should prefer the on-demand subpath imports below.

On-Demand Import (Recommended)

EXAMPLE.TYPESCRIPT
import { createApp } from 'vue'
import TxButton from '@talex-touch/tuffex/button'
import TxSwitch from '@talex-touch/tuffex/switch'
import TxTag from '@talex-touch/tuffex/tag'
import '@talex-touch/tuffex/base.css'
import '@talex-touch/tuffex/button/style.css'
import '@talex-touch/tuffex/switch/style.css'
import '@talex-touch/tuffex/tag/style.css'

const app = createApp(App)
app.use(TxButton)
app.use(TxSwitch)
app.use(TxTag)

Core Features

FeatureDescription
🎭 Living Tactile ExperienceElastic responses and damping effects for natural interactions
🌊 Silky Animation System60fps smooth animations based on Bézier curves
πŸ’Ž Modern Visual LanguageGlassmorphism aesthetics with frosted glass effects
⚑ Performance OptimizedVue3 Composition API + Tree Shaking, 50%+ smaller bundles
πŸ”— Tuff EcosystemSeamlessly integrated with Tuff desktop application

Available Components

Released

ComponentDescriptionSource
TuffButtonInteractive button with tactile feedbackbutton/
TuffSwitchToggle switch with smooth animationsswitch/
TuffInputInput with clearable and textarea supportinput/
TuffCheckboxCheckbox with SVG tick animationcheckbox/
TuffSelectDropdown select with floating positioningselect/
TuffSelectItemSelect option itemselect/
TuffProgressProgress bar with indeterminate modeprogress/

Planned

ComponentDescriptionSource
TuffModalModal dialog with entrance animationsmodal/
TxScrollCustom scrollbar with native feel@talex-touch/tuffex
TuffTabsTab navigation with indicator animationstabs/
TuffMenuMenu componentmenu/

Theming

TUFF UI supports custom theming through CSS variables:

EXAMPLE.CSS
:root {
  /* Primary colors */
  --tx-color-primary: #409eff;
  --tx-color-primary-light-3: #79bbff;

  /* Text colors */
  --tx-text-color-primary: #303133;
  --tx-text-color-secondary: #909399;

  /* Border and radius */
  --tx-border-color: #dcdfe6;
  --tx-border-radius-base: 4px;

  /* Transitions */
  --tx-transition-duration: 0.3s;
}

Tech Stack

TechnologyVersionPurpose
Vue3.5+Composition API
TypeScript5.8+Type safety
Vite6.0+Build tooling
Sass1.89+Style preprocessing
VueUse13.0+Composition utilities

Development

EXAMPLE.BASH
# In monorepo root
pnpm install

# Component source package
pnpm -C packages/tuffex run build
pnpm -C packages/tuffex run test
pnpm -C packages/tuffex run typecheck

# Showcase and docs are hosted by Tuff
pnpm -C apps/nexus run dev

Design Philosophy

  1. Tactile First - Every component should feel responsive and alive
  2. Performance - Animations must never compromise performance
  3. Accessibility - WCAG 2.1 AA compliance for all components
  4. Composability - Components work together seamlessly

Browser Support

  • Chrome 90+
  • Firefox 88+
  • Safari 14+
  • Edge 90+