TDesign Mobile Vue 3 UI Library

1.13.2 · active · verified Sun Apr 19

TDesign Mobile Vue is a comprehensive UI component library specifically designed for Vue 3 and mobile web applications. Currently stable at version 1.13.2, the library maintains a frequent release cadence with regular minor and patch updates, often several per month, introducing new features, bug fixes, and performance enhancements. It is part of the broader TDesign enterprise design system, ensuring consistent API and UI/UX across various frameworks like React and WeChat MiniProgram. Key differentiators include its focus on mobile-first interactions, high-quality components, dark mode support, extensive theme customization options, and built-in tree-shaking support for optimized bundle sizes. It ships with TypeScript types for improved developer experience and type safety.

Common errors

Warnings

Install

Imports

Quickstart

Sets up a basic Vue 3 application, registers TDesign globally, and demonstrates a TDesign Button component and a functional Toast API.

import { createApp } from 'vue';
import TDesign, { Button, Toast } from 'tdesign-mobile-vue';
import 'tdesign-mobile-vue/es/style/index.css'; // Import global styles

const App = {
  setup() {
    const showToast = () => {
      Toast.info('This is a toast message!');
    };
    return { showToast };
  },
  template: `
    <div style="padding: 20px;">
      <h1>TDesign Mobile Vue Quickstart</h1>
      <t-button block @click="showToast">Show Toast</t-button>
      <t-button block variant="outline" style="margin-top: 10px;">Outline Button</t-button>
      <p style="margin-top: 20px; font-size: 14px; color: #666;">
        This example demonstrates global registration, individual component usage, and a functional API.
      </p>
    </div>
  `,
};

const app = createApp(App);
app.use(TDesign); // Globally registers all TDesign components
app.mount('#app');

view raw JSON →