Components/Design Foundations

Design Foundations

The typography and color tokens every Tuffex component reads.

VerifiedSince 1.0.0

Usage

  • Values are the defaults; to override them, see Theming.
  • The Dark column applies under [data-theme='dark'] or .dark.

Typography

EXAMPLE.CSS
--tx-font-family:
  "Inter", "PingFang SC", "Microsoft YaHei",
  "Helvetica Neue", Arial, sans-serif;

--tx-font-size-base: 14px;
--tx-font-size-small: 12px;
--tx-font-size-large: 16px;
--tx-font-weight-primary: 500;

Color System

Brand + semantic

TokenLightDarkUsage
--tx-color-primary#409eff#409effPrimary actions
--tx-color-success#67c23a#4ade80Success states
--tx-color-warning#e6a23c#fbbf24Warning states
--tx-color-danger#f56c6c#f87171Error states
--tx-color-info#909399#909399Informational states

Primary ramps

TokenLightDarkUsage
--tx-color-primary-light-3#79bbff#3375b9Hover / focus tint
--tx-color-primary-light-5#a0cfff#2a598aSoft tint
--tx-color-primary-light-7#c6e2ff#213d5bSubtle tint
--tx-color-primary-light-9#ecf5ff#18222cSurface tint
--tx-color-primary-dark-2#337ecc#66b1ffActive tint

Text colors

TokenLightDarkUsage
--tx-text-color-primary#303133#e5eaf3Primary text
--tx-text-color-regular#606266#cfd3dcBody text
--tx-text-color-secondary#909399#a3a6adSecondary text
--tx-text-color-placeholder#a8abb2#8d9095Placeholder text
--tx-text-color-disabled#c0c4cc#6c6e72Disabled text

Surface + borders

TokenLightDarkUsage
--tx-bg-color#ffffff#141414App background
--tx-bg-color-page#f2f3f5#0a0a0aPage canvas
--tx-bg-color-overlay#ffffff#1d1e1fOverlays
--tx-fill-color#f0f2f5#303030Subtle fills
--tx-fill-color-light#f5f7fa#262727Lighter fill
--tx-fill-color-lighter#fafafa#1d1d1dLightest fill
--tx-fill-color-darker#ebeef5#3a3a3aDarker fill
--tx-fill-color-blank#fffffftransparentBlank fill
--tx-border-color#dcdfe6#4c4d4fDefault borders
--tx-border-color-light#e4e7ed#414243Light borders
--tx-border-color-lighter#ebeef5#363637Lighter borders
--tx-border-color-extra-light#f2f6fc#2b2b2cExtra light borders

Technologies

  • Source: packages/tuffex/packages/components/style/variables.scss, shipped as @talex-touch/tuffex/base.css.
  • The high-contrast palette has its own values; see Theming.