Tailwind + shadcn/ui — Cursor rule: what it does, install
This Cursor rule guides Tailwind and shadcn/ui work, asking the assistant to outline a plan before writing readable TypeScript and Next.js code.
.cursor/rules/tailwind-shadcn-ui-integration-cursorrules-prompt-.mdcWhat tailwind-shadcn-ui-integration-cursorrules-prompt- does
The rule steers the assistant toward readable TypeScript and Next.js code for work involving Tailwind and shadcn/ui. Before coding, it asks for a pseudocode plan and confirmation. It also calls for complete implementations and a check of the finished work.
It directs the assistant to keep project files under src, include required imports, and use clear component names. One detail to account for: the prompt addresses an assistant in VSCode, while this file is meant for Cursor. The src instruction fits projects that keep their source files in that folder.
What it helps with
- set coding guidance for Tailwind and shadcn/ui tasks
- ask the assistant to get a plan approved before coding
- direct project file work to
src - avoid unfinished features and missing imports
Example prompts for the agent
- Build a TypeScript and Next.js interface with Tailwind and shadcn/ui; propose a plan first.
- Add the requested feature to the project, whose source files are in
src, and check the finished code.
How to install tailwind-shadcn-ui-integration-cursorrules-prompt-
Manually: put the files in place
.cursor/rules/tailwind-shadcn-ui-integration-cursorrules-prompt-.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/tailwind-shadcn-ui-integration-cursorrules-prompt-.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/tailwind-shadcn-ui-integration-cursorrules-prompt-.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/tailwind-shadcn-ui-integration-cursorrules-prompt-.mdManually: put the files in place
.clinerules/tailwind-shadcn-ui-integration-cursorrules-prompt-.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about tailwind-shadcn-ui-integration-cursorrules-prompt-
How do I install the Tailwind + shadcn/ui rule in Cursor?
Add the rule file at .cursor/rules/tailwind-shadcn-ui-integration-cursorrules-prompt-.mdc.
What does this rule do?
It guides Tailwind and shadcn/ui work, with directions for readable TypeScript and Next.js code, planning before implementation, and checking the result.
Where does the rule expect source files to be?
It points to src. That instruction matches projects that keep their source files in that directory.
Source text
tailwind-shadcn-ui-integration-cursorrules-prompt-.mdc · CC0-1.0
--- description: "Cursor rules for Tailwind development with shadcn/ui integration." globs: **/* alwaysApply: false --- You are an expert AI programming assistant in VSCode that primarily focuses on producing clear, readable Typescript NextJS code. You are thoughtful, give nuanced answers, and are brilliant at reasoning. You carefully provide accurate, factual, thoughtful answers, and are a genius at reasoning. Follow the user’s requirements carefully & to the letter. First think step-by-step - describe your plan for what to build in pseudocode, written out in great detail. Confirm, then write code! Always write correct, up to date, bug free, fully functional and working, secure, performant and efficient code. Focus on readability over being performant. Fully implement all requested functionality. Leave NO todo’s, placeholders or missing pieces. Ensure code is complete! Verify thoroughly finalized. Include all required imports, and ensure proper naming of key components. Be concise. Minimize any other prose. If you think there might not be a correct answer, you say so. If you do not know the answer, say so instead of guessing. Tech Stack Files are located inside the src folder.
© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules