tailwind-patterns

tailwind-patterns is a cursor rule for Cursor from aliarghyani/vue-cursor-rules. It costs 0 tokens per session (894 once invoked), scanned A, original, MIT.

A set of Tailwind CSS styling rules for Vue 3, a framework for building web interfaces. It covers responsive layouts, dark mode, dynamic styles, reusable classes, and accessible component combinations.

In plain words
What is it for?
Use it when building or reviewing Vue 3 components styled with Tailwind CSS, especially buttons and other components with different sizes, states, or visual variants.
Why use it?
It gives Vue components a consistent way to handle variants, screen sizes, and themes without scattering custom CSS throughout the interface.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when building or reviewing Vue 3 components styled with Tailwind CSS, especially buttons and other components with different sizes, states, or visual variants.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/aliarghyani/vue-cursor-rules/tailwind-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/aliarghyani/vue-cursor-rules

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tailwind-patterns

README.md
[![agentmods](https://agentmods.dev/badge/rules/aliarghyani/vue-cursor-rules/tailwind-patterns/github.svg)](https://agentmods.dev/rules/aliarghyani/vue-cursor-rules/tailwind-patterns)
Your own site
<a href="https://agentmods.dev/rules/aliarghyani/vue-cursor-rules/tailwind-patterns"><img src="https://agentmods.dev/badge/rules/aliarghyani/vue-cursor-rules/tailwind-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tailwind-patterns

Your own site · 80×15
<a href="https://agentmods.dev/rules/aliarghyani/vue-cursor-rules/tailwind-patterns"><img src="https://agentmods.dev/badge/rules/aliarghyani/vue-cursor-rules/tailwind-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 894 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00894
Opus 5.5 $0.00000 $0.00358
Sonnet 5.5 $0.00000 $0.00179
Haiku 4.5 $0.00000 $0.00089

Measured 1mo ago against content hash 9a187c19226a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tailwind-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/tailwind-patterns.mdc · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Tailwind CSS Integration

Role: You are a Vue 3 expert specializing in utility-first CSS with Tailwind.

Core Rules:

  • Use computed classes for dynamic styling
  • Follow mobile-first responsive design
  • Implement dark mode with class variants
  • Prefer utility classes over custom CSS
  • Extract complex patterns to component classes

Chain-of-Thought: Think step-by-step: 1. Plan component variants 2. Create computed class objects 3. Apply responsive patterns 4. Add dark mode support

Note: Tailwind works alongside any UI kit -- use for custom styling or as the primary framework. Compatible with Headless UI for accessible components.

Component Styling Patterns

  • Drive variants with computed class arrays/objects so markup stays lean.
  • Full example: examples/tailwind-button.vue covers variant, size, and disabled props.
const sizeClasses = { sm: 'px-3 py-1.5 text-sm', md: 'px-4 py-2 text-base', lg: 'px-6 py-3 text-lg' }
const variantClasses = {
  primary: 'bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500',
  secondary: 'bg-gray-200 text-gray-900 hover:bg-gray-300 focus:ring-gray-500',
  danger: 'bg-red-600 text-white hover:bg-red-700 focus:ring-red-500',
}
const props = withDefaults(
  defineProps<{ variant?: keyof typeof variantClasses; size?: keyof typeof sizeClasses }>(),
  { variant: 'primary', size: 'md' }
)
const buttonClasses = computed(() => [
  'inline-flex items-center justify-center font-medium transition-colors',
  sizeClasses[props.size ?? 'md'],
  variantClasses[props.variant ?? 'primary'],
])

Responsive Design Patterns

  • Start mobile-first, then layer sm/ md/ lg utilities for additional breakpoints.
  • Extract repeatable grid/typography patterns into slots or components.
  • Full layout example: examples/tailwind-responsive.vue.
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">
  <article v-for="item in items" :key="item.id" class="rounded-lg shadow p-4">...</article>
</div>

Read the full file on GitHub · 106 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 106 lines · 0 tokens per session scan A 9a187c19226a

Subscribe to this mod's changes

tailwind-patterns is a cursor rule published in the GitHub repository aliarghyani/vue-cursor-rules (11 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 894 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.