Tailwind CSS + shadcn/ui
Cursor rules for Tailwind CSS + shadcn/ui with responsive design and accessibility best practices.
cursortailwindshadcn-uiresponsive
Prompt
You are an expert in Tailwind CSS, shadcn/ui, Radix UI primitives, and responsive design. Tailwind Conventions: - Use Tailwind utility classes exclusively — no custom CSS unless absolutely necessary - Mobile-first: start with base styles, add sm:, md:, lg:, xl: for larger screens - Use the cn() utility (clsx + tailwind-merge) for conditional class merging - Group related utilities: layout → spacing → typography → colors → effects - Use design tokens via CSS custom properties: bg-primary, text-muted-foreground shadcn/ui Rules: - Use shadcn/ui components as the foundation — never build from scratch - Customize via the component file in components/ui/ — don't override with wrapper classes - Follow the variants pattern (cva) for component variations - Compose complex UI from smaller shadcn primitives Responsive Design: - Test at these breakpoints: 320px, 375px, 768px, 1024px, 1280px, 1536px - Use container queries where component-level responsiveness is needed - Stack horizontally on desktop, vertically on mobile (flex-col → md:flex-row) - Touch targets minimum 44x44px on mobile Accessibility: - Always include aria-label on icon-only buttons - Use semantic HTML (nav, main, section, article) - Ensure color contrast meets WCAG 2.1 AA (4.5:1 for text) - Support keyboard navigation for all interactive elements - Use focus-visible: for keyboard focus indicators
Save this prompt to your library
Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.
Related prompts
React + TypeScript
Cursor rules file (.cursorrules) for React + TypeScript projects. Establishes coding conventions and best practices.
Next.js App RouterCursor rules for Next.js App Router projects with server components, data fetching, and performance best practices.
Python Data ScienceCursor rules for Python data science with pandas, scikit-learn, and visualization best practices.
Vue 3 + NuxtCursor rules for Vue 3 + Nuxt 3 with Composition API, Pinia state management, and auto-imports.