Files
agent-skills/skills/unocss/references/transformer-variant-group.md
Jason Woltje f5792c40be feat: Complete fleet — 94 skills across 10+ domains
Pulled ALL skills from 15 source repositories:
- anthropics/skills: 16 (docs, design, MCP, testing)
- obra/superpowers: 14 (TDD, debugging, agents, planning)
- coreyhaines31/marketingskills: 25 (marketing, CRO, SEO, growth)
- better-auth/skills: 5 (auth patterns)
- vercel-labs/agent-skills: 5 (React, design, Vercel)
- antfu/skills: 16 (Vue, Vite, Vitest, pnpm, Turborepo)
- Plus 13 individual skills from various repos

Mosaic Stack is not limited to coding — the Orchestrator and
subagents serve coding, business, design, marketing, writing,
logistics, analysis, and more.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 16:27:42 -06:00

98 lines
1.8 KiB
Markdown

---
name: transformer-variant-group
description: Shorthand for grouping utilities with common prefixes
---
# Transformer Variant Group
Enables shorthand syntax for grouping utilities with common prefixes.
## Installation
```ts
import { defineConfig, transformerVariantGroup } from 'unocss'
export default defineConfig({
transformers: [
transformerVariantGroup(),
],
})
```
## Usage
Group multiple utilities under one variant prefix using parentheses:
```html
<!-- Before transformation -->
<div class="hover:(bg-gray-400 font-medium) font-(light mono)" />
<!-- After transformation -->
<div class="hover:bg-gray-400 hover:font-medium font-light font-mono" />
```
## Examples
### Hover States
```html
<button class="hover:(bg-blue-600 text-white scale-105)">
Hover me
</button>
```
Expands to: `hover:bg-blue-600 hover:text-white hover:scale-105`
### Dark Mode
```html
<div class="dark:(bg-gray-800 text-white)">
Dark content
</div>
```
Expands to: `dark:bg-gray-800 dark:text-white`
### Responsive
```html
<div class="md:(flex items-center gap-4)">
Responsive flex
</div>
```
Expands to: `md:flex md:items-center md:gap-4`
### Nested Groups
```html
<div class="lg:hover:(bg-blue-500 text-white)">
Large screen hover
</div>
```
Expands to: `lg:hover:bg-blue-500 lg:hover:text-white`
### Multiple Prefixes
```html
<div class="text-(sm gray-600) font-(medium mono)">
Styled text
</div>
```
Expands to: `text-sm text-gray-600 font-medium font-mono`
## Key Points
- Use parentheses `()` to group utilities
- The prefix applies to all utilities inside the group
- Can be combined with any variant (hover, dark, responsive, etc.)
- Nesting is supported
- Works in class attributes and other extraction sources
<!--
Source references:
- https://unocss.dev/transformers/variant-group
-->