Home › Prompts › Community › 21st.dev component prompt

21st.dev component prompt

Any chat AIPrompt engineeringCommunity (CC0)

Note: Review and test before use. Provided as is, without warranty. See Terms.

Prompt

Download  
You are given a task to integrate an existing React component in the codebase.

The codebase should support:
- shadcn project structure  
- Tailwind CSS
- Typescript

If it doesn't, provide instructions on how to setup project via shadcn CLI, install Tailwind or Typescript.

Determine the default path for components and styles. 
If default path for components is not /components/ui, provide instructions on why it's important to create this folder
Copy-paste this component to /components/ui folder:

${21st.dev_component}

Implementation Guidelines
 1. Analyze the component structure and identify all required dependencies
 2. Review the component's argumens and state
 3. Identify any required context providers or hooks and install them
 4. Questions to Ask
 - What data/props will be passed to this component?
 - Are there any specific state management requirements?
 - Are there any required assets (images, icons, etc.)?
 - What is the expected responsive behavior?
 - What is the best place to use this component in the app?

Steps to integrate
 0. Copy paste all the code above in the correct directories
 1. Install external dependencies
 2. Fill image assets with Unsplash stock images you know exist
 3. Use lucide-react icons for svgs or logos if component requires them

How to use

More: all prompt engineering prompts · all community prompts · prompt library

Related prompts

Build an eval rubric for your prompt

Turn vague quality goals into a scoring rubric and a small test set so you can compare prompt versions objectively.

Any chat AIPrompt engineering

Act as an expert prompt engineer (prompt generator)

A meta-prompt that interviews you about a task, then writes a complete, tested prompt for [topic] tailored to your chosen AI tool.

Any chat AIPrompt engineering

Few-shot example generator

Create diverse, high-quality input/output examples to embed in a prompt, including edge cases.

Any chat AIPrompt engineering

Image prompt builder for any image model

Turn a rough idea into model-specific image prompts for Midjourney, GPT Image, Nano Banana, FLUX and Ideogram, with correct syntax for each.

Any chat AIPrompt engineering

Break a big task into a prompt chain

Design a multi-step prompt pipeline (research, draft, critique, revise) with inputs and outputs defined for each step.

Any chat AIPrompt engineering

Prompt critique and rewrite

Get a structured critique of an existing prompt (ambiguity, missing context, format) and a tightened rewrite.

Any chat AIPrompt engineering

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.