Tdesign Miniprogram logo

Tdesign Miniprogram

Community
bighardperson
tdesign-miniprogram

TDesign WeChat Mini Program UI component library by Tencent. Use when building WeChat mini apps with TDesign components (Button, Dialog, Input, Tabs, Chat, etc.), implementing TDesign design system, customizing themes/dark mode, or building AI chat interfaces in mini programs.

Overview

Publisherbighardperson
Repositorycomputer-science-skills-collection
Skill nametdesign-miniprogram
Stars
66
Forks
10
Bundled files
76
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 76 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by bighardperson on GitHub. Read the source before you install it.

Installation

Install the Tdesign Miniprogram AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/bighardperson/computer-science-skills-collection/tree/main/skills/TDesign%20微信小程序组件
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.

Use it in TypingMind

Enable Tdesign Miniprogram in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Tdesign Miniprogram on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Tdesign Miniprogram is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

TDesign Mini Program Skill

TDesign WeChat Mini Program component library, an enterprise-level design system by Tencent. Provides 60+ high-quality components with dark mode support, theme customization, and more.

When to Use This Skill

This skill should be triggered when:

  • Developing WeChat Mini Programs with TDesign component library
  • Using TDesign UI components (Button, Input, Dialog, etc.)
  • Implementing interfaces following TDesign design specifications
  • Configuring TDesign themes and style customization
  • Building AI chat interfaces (using TDesign Chat components)
  • Implementing dark mode adaptation

Quick Start

Installation

bash
npm i tdesign-miniprogram -S --production

Modify app.json

Remove "style": "v2" from app.json to avoid style conflicts.

Modify project.config.json

Add the following to the setting section of project.config.json:

json
{
  "setting": {
    "packNpmManually": true,
    "packNpmRelationList": [
      {
        "packageJsonPath": "./package.json",
        "miniprogramNpmDistDir": "./"
      }
    ]
  }
}

Modify tsconfig.json (TypeScript projects)

json
{
  "paths": {
    "tdesign-miniprogram/*": [
      "./miniprogram/miniprogram_npm/tdesign-miniprogram/*"
    ]
  }
}

After modifying project.config.json, build npm in WeChat DevTools: Tools - Build npm

After successful build, check Compile JS to ES5

Using Components

Import in page or component JSON file:

json
{
  "usingComponents": {
    "t-button": "tdesign-miniprogram/button/button"
  }
}

Use in WXML:

html
<t-button theme="primary">Button</t-button>

Component Categories

Basic Components (6)

ComponentDescriptionImport Path
ButtonButtontdesign-miniprogram/button/button
DividerDividertdesign-miniprogram/divider/divider
FabFloating Action Buttontdesign-miniprogram/fab/fab
IconIcontdesign-miniprogram/icon/icon
LayoutLayouttdesign-miniprogram/row/row
LinkLinktdesign-miniprogram/link/link

Navigation Components (8)

ComponentDescriptionImport Path
BackTopBack to Toptdesign-miniprogram/back-top/back-top
DrawerDrawertdesign-miniprogram/drawer/drawer
IndexesIndex Listtdesign-miniprogram/indexes/indexes
NavbarNavigation Bartdesign-miniprogram/navbar/navbar
SideBarSide Navigationtdesign-miniprogram/side-bar/side-bar
StepsStepstdesign-miniprogram/steps/steps
TabBarBottom Tab Bartdesign-miniprogram/tab-bar/tab-bar
TabsTabstdesign-miniprogram/tabs/tabs

Input Components (16)

ComponentDescriptionImport Path
CalendarCalendartdesign-miniprogram/calendar/calendar
CascaderCascadertdesign-miniprogram/cascader/cascader
CheckBoxCheckboxtdesign-miniprogram/checkbox/checkbox
DateTimePickerDate Time Pickertdesign-miniprogram/date-time-picker/date-time-picker
InputInputtdesign-miniprogram/input/input
PickerPickertdesign-miniprogram/picker/picker
RadioRadiotdesign-miniprogram/radio/radio
RateRatetdesign-miniprogram/rate/rate
SearchSearchtdesign-miniprogram/search/search
SliderSlidertdesign-miniprogram/slider/slider
StepperSteppertdesign-miniprogram/stepper/stepper
SwitchSwitchtdesign-miniprogram/switch/switch
TextareaTextareatdesign-miniprogram/textarea/textarea
TreeSelectTree Selecttdesign-miniprogram/tree-select/tree-select
UploadUploadtdesign-miniprogram/upload/upload
FormFormtdesign-miniprogram/form/form

Data Display Components (18)

ComponentDescriptionImport Path
AvatarAvatartdesign-miniprogram/avatar/avatar
BadgeBadgetdesign-miniprogram/badge/badge
CellCelltdesign-miniprogram/cell/cell
CollapseCollapsetdesign-miniprogram/collapse/collapse
CountDownCountdowntdesign-miniprogram/count-down/count-down
EmptyEmpty Statetdesign-miniprogram/empty/empty
FooterFootertdesign-miniprogram/footer/footer
GridGridtdesign-miniprogram/grid/grid
ImageImagetdesign-miniprogram/image/image
ImageViewerImage Viewertdesign-miniprogram/image-viewer/image-viewer
ProgressProgresstdesign-miniprogram/progress/progress
ResultResulttdesign-miniprogram/result/result
SkeletonSkeletontdesign-miniprogram/skeleton/skeleton
StickyStickytdesign-miniprogram/sticky/sticky
SwiperSwipertdesign-miniprogram/swiper/swiper
TableTabletdesign-miniprogram/table/table
TagTagtdesign-miniprogram/tag/tag
ListListtdesign-miniprogram/list/list

Feedback Components (12)

ComponentDescriptionImport Path
ActionSheetAction Sheettdesign-miniprogram/action-sheet/action-sheet
DialogDialogtdesign-miniprogram/dialog/dialog
DropdownMenuDropdown Menutdesign-miniprogram/dropdown-menu/dropdown-menu
GuideGuidetdesign-miniprogram/guide/guide
LoadingLoadingtdesign-miniprogram/loading/loading
MessageMessagetdesign-miniprogram/message/message
NoticeBarNotice Bartdesign-miniprogram/notice-bar/notice-bar
OverlayOverlaytdesign-miniprogram/overlay/overlay
PopupPopuptdesign-miniprogram/popup/popup
PullDownRefreshPull Down Refreshtdesign-miniprogram/pull-down-refresh/pull-down-refresh
SwipeCellSwipe Celltdesign-miniprogram/swipe-cell/swipe-cell
ToastToasttdesign-miniprogram/toast/toast

AI Chat Components (9)

ComponentDescriptionImport Path
ChatListChat Listtdesign-miniprogram/chat-list/chat-list
ChatMessageChat Messagetdesign-miniprogram/chat-message/chat-message
ChatSenderChat Sendertdesign-miniprogram/chat-sender/chat-sender
ChatContentChat Contenttdesign-miniprogram/chat-content/chat-content
ChatActionbarChat Action Bartdesign-miniprogram/chat-actionbar/chat-actionbar
ChatLoadingChat Loadingtdesign-miniprogram/chat-loading/chat-loading
ChatMarkdownChat Markdowntdesign-miniprogram/chat-markdown/chat-markdown
ChatThinkingChat Thinkingtdesign-miniprogram/chat-thinking/chat-thinking
AttachmentsAttachmentstdesign-miniprogram/attachments/attachments

Common Patterns

Button

html
<!-- Basic Buttons -->
<t-button theme="primary" size="large">Primary Button</t-button>
<t-button theme="light" size="large">Light Button</t-button>
<t-button size="large">Default Button</t-button>

<!-- Outline and Text Buttons -->
<t-button theme="primary" size="large" variant="outline"
  >Outline Button</t-button
>
<t-button theme="primary" size="large" variant="text">Text Button</t-button>

<!-- Icon Button -->
<t-button
  theme="primary"
  icon="app"
  content="Icon Button"
  size="large"
></t-button>

<!-- Loading State -->
<t-button theme="primary" size="large" loading>Loading</t-button>

<!-- Disabled State -->
<t-button theme="primary" size="large" disabled>Disabled</t-button>

<!-- Block Button -->
<t-button theme="primary" size="large" block>Block Button</t-button>

<!-- Ghost Button (transparent background) -->
<t-button theme="primary" ghost size="large">Ghost Button</t-button>

Input

json
{
  "usingComponents": {
    "t-input": "tdesign-miniprogram/input/input"
  }
}
html
<t-input
  label="Label"
  placeholder="Please enter"
  value="{{value}}"
  bind:change="onChange"
/>

Dialog

json
{
  "usingComponents": {
    "t-dialog": "tdesign-miniprogram/dialog/dialog"
  }
}
html
<t-dialog
  visible="{{visible}}"
  title="Dialog Title"
  content="Dialog content"
  confirm-btn="Confirm"
  cancel-btn="Cancel"
  bind:confirm="onConfirm"
  bind:cancel="onCancel"
/>

Toast

javascript
import Toast from 'tdesign-miniprogram/toast/index';

Toast({
  context: this,
  selector: '#t-toast',
  message: 'Toast message',
});

AI Chat Interface

json
{
  "usingComponents": {
    "t-chat-list": "tdesign-miniprogram/chat-list/chat-list",
    "t-chat-message": "tdesign-miniprogram/chat-message/chat-message",
    "t-chat-sender": "tdesign-miniprogram/chat-sender/chat-sender"
  }
}
html
<t-chat-list layout="single">
  <t-chat-message
    avatar="{{item.avatar}}"
    name="{{item.name}}"
    content="{{item.content}}"
    role="{{item.role}}"
  />
  <view slot="footer">
    <t-chat-sender bind:send="onSend" />
  </view>
</t-chat-list>
javascript
Component({
  data: {
    messages: [
      {
        role: 'user',
        content: [{ type: 'text', data: 'Hello' }],
      },
      {
        role: 'assistant',
        content: [{ type: 'text', data: 'Hello! How can I help you?' }],
      },
    ],
  },
  methods: {
    onSend(e) {
      const { value } = e.detail;
      // Handle send message
    },
  },
});

Style Customization

Method 1: Using Style Attribute

html
<t-button style="color: red">Custom Style</t-button>
<t-button custom-style="color: red">Custom Style</t-button>

Method 2: Disable Style Isolation

Override styles directly in page:

css
.t-button--primary {
  background-color: navy;
}

In custom components, enable styleIsolation:

javascript
Component({
  options: {
    styleIsolation: 'shared',
  },
});

Method 3: External Style Classes

html
<t-button t-class="my-button-class">Button</t-button>
css
.my-button-class {
  background-color: navy !important;
}

Method 4: CSS Variables

TDesign provides rich CSS variables for theme customization:

css
page {
  --td-button-primary-bg-color: #0052d9;
  --td-button-border-radius: 8rpx;
}

Dark Mode

1. Modify app.json

json
{
  "darkmode": true
}

2. Import Design Token

In app.wxss:

css
@import 'miniprogram_npm/tdesign-miniprogram/common/style/theme/_index.wxss';

3. Use CSS Variables

css
.text {
  color: var(--td-text-color-secondary);
}

4. Special Component Adaptation

For components wrapped in custom-tab-bar or root-portal, add .page class:

html
<view class="page">
  <t-tab-bar />
</view>

Reference Files

This skill includes comprehensive documentation in references/:

Basic Documentation

  • miniprogram/getting-started.md - Quick start guide
  • miniprogram/overview.md - Component overview
  • miniprogram/custom-style.md - Style customization
  • miniprogram/custom-theme.md - Theme customization
  • miniprogram/dark-mode.md - Dark mode

Component Documentation (miniprogram/components/)

  • button.md - Button
  • input.md - Input
  • dialog.md - Dialog
  • form.md - Form
  • ... more component docs

AI Chat Component Documentation (miniprogram-chat/)

  • getting-started.md - Chat component quick start
  • sse.md - SSE streaming
  • components/chat-message.md - Chat message
  • components/chat-sender.md - Chat sender
  • components/chat-list.md - Chat list
  • ... more chat component docs

Use Read tool to access specific reference files when detailed API information is needed.

Key Requirements

  • Minimum base library version: ^2.12.0
  • Build npm in WeChat DevTools required
  • Remove "style": "v2" from app.json

Resources

Notes

  • This skill was automatically generated from TDesign official documentation
  • Reference files preserve the structure and examples from source docs
  • Some reference content remains in Chinese as per official documentation

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

and 16 more files.

Frequently asked questions

What does the Tdesign Miniprogram AI skill do?

TDesign WeChat Mini Program UI component library by Tencent. Use when building WeChat mini apps with TDesign components (Button, Dialog, Input, Tabs, Chat, etc.), implementing TDesign design system, customizing themes/dark mode, or building AI chat interfaces in mini programs.

Why use Tdesign Miniprogram on TypingMind?

Because you install it once and use it with any model. Tdesign Miniprogram is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Tdesign Miniprogram in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/bighardperson/computer-science-skills-collection/tree/main/skills/TDesign%20微信小程序组件. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Tdesign Miniprogram?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Tdesign Miniprogram?

As many as you like. As long as a model supports skills, you can use Tdesign Miniprogram with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Tdesign Miniprogram AI skill free?

It is published on GitHub by bighardperson. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇