Components/Installation

Installation

Install Tuffex and import it per component, per suite, or from the root entry.

Since 0.4.0BETA

Installation

Vue 3 is a peer dependency.

pnpm add @talex-touch/tuffex

Usage

All three give you the same components; they differ only in bundle size.

StyleImport pathUse for
Per component@talex-touch/tuffex/buttonNew code; bundles only what you use
Per suite@talex-touch/tuffex/basePages that use one suite heavily
Root entry@talex-touch/tuffexMigration only; pulls in the whole library
EXAMPLE.TYPESCRIPT
import TxButton from '@talex-touch/tuffex/button'
import TxSwitch from '@talex-touch/tuffex/switch'
import '@talex-touch/tuffex/base.css'
import '@talex-touch/tuffex/button/style.css'
import '@talex-touch/tuffex/switch/style.css'

app.use(TxButton)
app.use(TxSwitch)

Per Suite

The base, pro, and ai entries don't overlap and export named components only, so Motion components come from pro and charts from @talex-touch/tuffex/charts.

EXAMPLE.TYPESCRIPT
import { TxButton, TuffSwitch } from '@talex-touch/tuffex/base'
import '@talex-touch/tuffex/base.css'
import '@talex-touch/tuffex/button/style.css'
import '@talex-touch/tuffex/switch/style.css'

app.use(TxButton)
app.use(TuffSwitch)
EXAMPLE.TYPESCRIPT
import { TxTimeseriesChart } from '@talex-touch/tuffex/charts'
import '@talex-touch/tuffex/charts/style.css'

Root Entry (Migration)

EXAMPLE.TYPESCRIPT
import TuffUI from '@talex-touch/tuffex'
import '@talex-touch/tuffex/style.css'

app.use(TuffUI)

Styles

Styles are not injected by JavaScript, and Theming covers token overrides.

StylesheetContentsRequired
@talex-touch/tuffex/base.css--tx-* variables, reset, theme selectorsYes, once per app
@talex-touch/tuffex/<name>/style.cssOne component's stylesFor each component you use
@talex-touch/tuffex/style.cssAll component stylesRoot entry only

Utils

EXAMPLE.TYPESCRIPT
import { nextZIndex, toast } from '@talex-touch/tuffex/utils'

Full API in Utils.

Technologies

  • Entry map: exports in packages/tuffex/package.json.
  • Suite entries: packages/tuffex/packages/components/src/{base,pro,ai}/index.ts; suite-barrels.test.ts checks that together they partition every component exactly.