What problem does it solve?
Dynamic class composition in weapp-tailwindcss projects often breaks because runtime-generated classes are not scanned by the build-time generator, conflicts are not merged correctly, or mini-program escaping is applied twice. This Skill guides package selection and safe class composition across the @weapp-tailwindcss runtime ecosystem.
Core Features & Use Cases
- Runtime Package Selection: Choose between @weapp-tailwindcss/runtime, merge, cva, variants, typography, theme-transition, and ui based on the task, respecting each package's exports and subpath entries.
- Safe Class Composition: Build cn helpers with clsx plus twMerge, define single-slot variants with cva, and multi-slot recipes with tv, while keeping classes as complete literals the build can scan.
- Escaping and Ignore Control: Use weappTwIgnore for precise pass-through, configure ignoreTaggedTemplateExpressionIdentifiers, and implement custom escape/unescape or rpx transformers with cache-safe pure functions.
- Use Case: A component library needs external class overrides on a multi-slot Card. Use @weapp-tailwindcss/variants tv() with per-slot class parameters, declare root-class in customAttributes, and verify conflict resolution with production-minified output.
Quick Start
Ask the assistant to compose dynamic Tailwind classes for a mini-program component using the correct @weapp-tailwindcss runtime package and verify the classes survive the build.