Skip to main content
rule

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.

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/solidjs-tailwind-cursorrules-prompt-file.mdc
Open on GitHub

What 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 dark variant

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 @apply inside styles/.

How to install solidjs-tailwind-cursorrules-prompt-file

Manually: put the files in place

.cursor/rules/solidjs-tailwind-cursorrules-prompt-file.mdc

Frontmatter: description, globs, alwaysApply

Step 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

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set68

tanstack-query-v5-cursorrules-prompt-file A Cursor rule that tells the agent how to write TanStack Query v5 code: query keys, mutations, optimistic updates, Suspense and prefetching. ★ 41,011repo stars tailwind-react-firebase-cursorrules-prompt-file A Cursor rule that sets conventions for a mobile-first web app built with Tailwind, React and Firebase. ★ 41,011repo stars sveltekit-typescript-guide-cursorrules-prompt-file A Cursor rule that points the agent at Svelte 5, SvelteKit and TypeScript: project structure, runes, state handling. ★ 41,011repo stars svelte A Cursor rule that steers the agent toward Svelte conventions: component structure, reactivity, stores, SvelteKit routing and tests. Useful when the agent writes or edits Svelte code. ★ 41,011repo stars solidity-hardhat-cursorrules-prompt-file A Cursor rule that turns the AI assistant into a Solidity and smart contract security expert, with Hardhat-based testing and gas work. ★ 41,011repo stars snowflake-snowpark-dbt-cursorrules-prompt-file A Cursor rule that gives the agent context for Snowpark Python and dbt with the Snowflake adapter. Useful when you write transformation pipelines in either tool. ★ 41,011repo stars shopify-theme-dev-liquid A Cursor rule collecting Shopify theme practices across Liquid, JavaScript, CSS, accessibility and performance. Useful when you build a theme and want the agent to keep the structure. ★ 41,011repo stars salesforce-apex-cursorrules-prompt-file A Cursor rule that points the agent at Salesforce Apex work: queueables instead of @future, GoF patterns, and almost no comments. ★ 41,011repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor