component-create-ui

component-create-ui is a cursor rule for Cursor from oakensoul/nextjs-cursor-prompts. It costs 0 tokens per session (3,373 once invoked), scanned A, original, MIT.

A set of project rules for creating reusable user-interface components, such as buttons, cards, tabs, alerts, and inputs.

In plain words
What is it for?
Use it when adding a UI component to a TypeScript React or Next.js project. It guides component placement, design-system integration, variants, state handling, and accessibility.
Why use it?
It helps keep new components consistent with the design system while covering keyboard use, screen readers, responsive behavior, testing, and performance.

Cursor rule 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 rules/oakensoul/nextjs-cursor-prompts/component-create-ui
Clone the repo
git clone --depth 1 https://github.com/oakensoul/nextjs-cursor-prompts

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for component-create-ui

README.md
[![agentmods](https://agentmods.dev/badge/rules/oakensoul/nextjs-cursor-prompts/component-create-ui.svg)](https://agentmods.dev/rules/oakensoul/nextjs-cursor-prompts/component-create-ui)
Your own site
<a href="https://agentmods.dev/rules/oakensoul/nextjs-cursor-prompts/component-create-ui"><img src="https://agentmods.dev/badge/rules/oakensoul/nextjs-cursor-prompts/component-create-ui.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 3,373 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.03373
Opus 5 $0.00000 $0.01687
Sonnet 5 $0.00000 $0.00675
Haiku 4.5 $0.00000 $0.00337

Measured 4d ago against content hash 2490aa6ac4c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

component-create-ui 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 4d ago.

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/prompts/component/component-create-ui.mdc · 426 lines

How it starts

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

UI Component Creation Request

Please create a new UI component following our design system patterns and accessibility standards:

🎯 UI COMPONENT CREATION OBJECTIVES:

  1. INTEGRATE with design system using Catalyst base components and TailwindCSS patterns
  2. IMPLEMENT comprehensive accessibility with ARIA attributes and keyboard navigation
  3. PROVIDE flexible variants with consistent visual design and interaction patterns
  4. ENSURE optimal performance with proper state management and optimization
  5. FOLLOW project standards for TypeScript, testing, and component architecture

📋 UI COMPONENT DEVELOPMENT METHODOLOGY:

STEP 1: Component Planning and Design System Integration

Determine Component Type and Location:
  • Client Component: src/components/client/ui/ - Interactive UI components
  • Base Component Extension: Extend Catalyst components when available
  • Component Categories:
    • Input Components: Buttons, inputs, selects, checkboxes (input/)
    • Display Components: Cards, badges, avatars, progress (display/)
    • Navigation Components: Tabs, pagination, breadcrumbs (navigation/)
    • Feedback Components: Alerts, toasts, modals, tooltips (feedback/)
    • Layout Components: Dividers, spacers, containers (layout/)
Design System Assessment:
  • Catalyst Integration: Check if base component exists in components/catalyst/
  • Design Tokens: Use established color, spacing, and typography scales
  • Variant System: Plan consistent size, color, and state variants
  • Accessibility Requirements: Plan ARIA attributes and keyboard interactions

STEP 2: Component Variants and States Design

Variant System Pattern:
// Define comprehensive variant types
interface ComponentVariants {
  /** Visual style variant */
  variant: 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive';
  /** Size variant */
  size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
  /** Color scheme */
  color?: 'blue' | 'green' | 'red' | 'gray' | 'yellow';
  /** State variants */
  disabled?: boolean;
  loading?: boolean;
}

// Implement with class-variance-authority or similar
const componentVariants = cva(
  "base-component-classes",
  {
    variants: {
      variant: {
        primary: "bg-blue-600 text-white hover:bg-blue-700",
        secondary: "bg-gray-200 text-gray-900 hover:bg-gray-300",
        outline: "border border-gray-300 hover:bg-gray-50",
        ghost: "hover:bg-gray-100",
        destructive: "bg-red-600 text-white hover:bg-red-700"
      },
      size: {
        xs: "px-2 py-1 text-xs",
        sm: "px-3 py-1.5 text-sm",
        md: "px-4 py-2 text-base",
        lg: "px-6 py-3 text-lg",
        xl: "px-8 py-4 text-xl"
      }
    },
    defaultVariants: {
      variant: "primary",
      size: "md"
    }
  }
);

Read the full file on GitHub · 426 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. 4d ago First seen · 426 lines · 0 tokens per session scan A 2490aa6ac4c1

Subscribe to this mod's changes

component-create-ui is a cursor rule published in the GitHub repository oakensoul/nextjs-cursor-prompts (4 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,373 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.