create-responsive-layout

Instructions for building layouts with Tailwind CSS, a utility-based styling system, so pages adapt to phones, tablets, and desktop screens.

In plain words
What is it for?
Use it to create mobile-first grids, containers, text sizing, visibility rules, and responsive navigation.
Why use it?
It provides patterns for handling different screen sizes instead of designing for only one device width.

Command for Cursor

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.

agentmods
npx agentmods add commands/farzannajipour/cursor-react-rules/create-responsive-layout
Clone the repo
git clone --depth 1 https://github.com/Farzannajipour/cursor-react-rules

Made for: Cursor.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,169 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.02169
Opus 5 $0.00000 $0.01085
Sonnet 5 $0.00000 $0.00434
Haiku 4.5 $0.00000 $0.00217

Measured yesterday against content hash 75dcdddaa96f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

create-responsive-layout 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 yesterday.

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/commands/create-responsive-layout.md · 297 lines

How it starts

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

Create Responsive Layout

Overview

Build mobile-first responsive layouts with Tailwind CSS that work across all device sizes.

Mobile-First Approach

Start with mobile styles, then add breakpoints for larger screens.

Tailwind Breakpoints

  • sm: 640px
  • md: 768px
  • lg: 1024px
  • xl: 1280px
  • 2xl: 1536px

Common Patterns

Responsive Grid

// 1 column mobile, 2 tablet, 3 desktop, 4 large desktop
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4">
  {items.map(item => (
    <Card key={item.id} item={item} />
  ))}
</div>

Responsive Container

<div className="container mx-auto px-4 sm:px-6 lg:px-8">
  <h1 className="text-2xl sm:text-3xl lg:text-4xl font-bold">
    Responsive Title
  </h1>
</div>

Hide/Show Elements

// Hide on mobile, show on desktop
<div className="hidden lg:block">
  Desktop sidebar
</div>

// Show on mobile, hide on desktop
<div className="block lg:hidden">
  Mobile menu button
</div>

Responsive Navigation

export function Navigation() {
  const [isOpen, setIsOpen] = useState(false);

  return (
    <nav className="bg-white shadow">
      <div className="container mx-auto px-4">
        <div className="flex justify-between items-center h-16">
          {/* Logo */}
          <div className="flex-shrink-0">
            <Logo />
          </div>

          {/* Desktop Navigation */}
          <div className="hidden md:flex space-x-4">
            <Link href="/" className="px-3 py-2 rounded hover:bg-gray-100">
              Home
            </Link>
            <Link href="/about" className="px-3 py-2 rounded hover:bg-gray-100">
              About
            </Link>
            <Link href="/contact" className="px-3 py-2 rounded hover:bg-gray-100">
              Contact
            </Link>
          </div>

          {/* Mobile Menu Button */}
          <button
            onClick={() => setIsOpen(!isOpen)}
            className="md:hidden p-2 rounded hover:bg-gray-100"
          >
            <MenuIcon className="w-6 h-6" />
          </button>
        </div>

        {/* Mobile Menu */}
        {isOpen && (
          <div className="md:hidden py-2">
            <Link href="/" className="block px-4 py-2 hover:bg-gray-100">
              Home
            </Link>
            <Link href="/about" className="block px-4 py-2 hover:bg-gray-100">
              About
            </Link>
            <Link href="/contact" className="block px-4 py-2 hover:bg-gray-100">
              Contact
            </Link>
          </div>
        )}
      </div>
    </nav>
  );
}

Read the full file on GitHub · 297 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. yesterday First seen · 297 lines · 0 tokens per session scan A 75dcdddaa96f

Subscribe to this mod's changes

create-responsive-layout is a command published in the GitHub repository Farzannajipour/cursor-react-rules (3 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,169 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-31.