solidjs-tailwind-cursorrules-prompt-file — Cursor rule for Solid.js +
A Cursor rule that tells the agent how to write Solid.js code with Tailwind CSS: signals, utility classes, folder layout.
.cursor/rules/solidjs-tailwind-cursorrules-prompt-file.mdcWhat solidjs-tailwind-cursorrules-prompt-file does
The file spells out how Solid.js components should be written with Tailwind CSS. The agent gets a list of preferences: functional components, reactive state via createSignal(), styling with Tailwind classes, the @apply directive for reusable styles, responsive classes, and dark mode through Tailwind's dark variant.
A folder structure is included too: src/ with components, pages, styles, plus App.jsx and index.jsx, then public/index.html, and tailwind.config.js and postcss.config.js at the root. A separate block of instructions recommends JSX templates, purging unused Tailwind classes for production builds, Solid Router for routing, the @layer directive for custom styles, and JIT mode.
The rule ships with alwaysApply: false and globs: **/*, so it does not activate on its own. Drop the file into .cursor/rules/ and forget to enable it for your files, and the agent never sees the instructions. That is the first thing to check after install.
What it helps with
- stop the agent from writing React hooks in a Solid.js component
- keep styling in Tailwind classes instead of separate CSS files
- pull repeated class strings into
@apply - build responsive layouts with Tailwind breakpoints
- add dark mode with the
darkvariant
Example prompts for the agent
- Build a counter component in Solid.js: state with
createSignal(), buttons styled with Tailwind classes. - Make the product card responsive: one column on mobile, three on desktop, dark mode via
dark:. - Move the repeated button classes into
@applyinsidestyles/.
How to install solidjs-tailwind-cursorrules-prompt-file
Manually: put the files in place
.cursor/rules/solidjs-tailwind-cursorrules-prompt-file.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/solidjs-tailwind-cursorrules-prompt-file.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/solidjs-tailwind-cursorrules-prompt-file.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/solidjs-tailwind-cursorrules-prompt-file.mdManually: put the files in place
.clinerules/solidjs-tailwind-cursorrules-prompt-file.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about solidjs-tailwind-cursorrules-prompt-file
How do I install solidjs-tailwind-cursorrules-prompt-file in Cursor?
Place the file at .cursor/rules/solidjs-tailwind-cursorrules-prompt-file.mdc in your project root. Then enable the rule for the files you want it applied to, since it is off by default.
What does this rule do?
It gives the Cursor agent conventions for Solid.js and Tailwind CSS: functional components, createSignal(), utility classes, @apply, @layer, dark mode, and a project folder layout.
Why doesn't the rule kick in right away?
It sets alwaysApply: false with globs: **/*. Until you turn it on manually, Cursor does not pull these instructions into context.
Source text
solidjs-tailwind-cursorrules-prompt-file.mdc · CC0-1.0
--- description: "Cursor rules for Solid.js development with Tailwind CSS integration." globs: **/* alwaysApply: false --- // Solid.js with Tailwind CSS .cursorrules // Prefer functional components const preferFunctionalComponents = true; // Solid.js and Tailwind CSS best practices const solidjsTailwindBestPractices = [ "Use createSignal() for reactive state", "Implement Tailwind CSS classes for styling", "Utilize @apply directive in CSS files for reusable styles", "Implement responsive design using Tailwind's responsive classes", "Use Tailwind's configuration file for customization", "Implement dark mode using Tailwind's dark variant", ]; // Folder structure const folderStructure = ` src/ components/ pages/ styles/ App.jsx index.jsx public/ index.html tailwind.config.js postcss.config.js `; // Additional instructions const additionalInstructions = ` 1. Use JSX for component templates 2. Implement proper Tailwind CSS purging for production builds 3. Utilize Solid Router for routing when applicable 4. Use Tailwind's @layer directive for custom styles 5. Implement utility-first CSS approach 6. Follow both Solid.js and Tailwind naming conventions 7. Use JIT (Just-In-Time) mode for faster development `;
© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules