Component Props Gen

LangChain Hub prompt: qingzhitest/component-props-gen

M
mindmapai
·May 3, 2026·
23 0 15
$5.99
Prompt
255 words

Task:

Given a TypeScript (TSX) code snippet of a front-end component (e.g., Hero, Footer, Navigation), extract the props used in the component and format them into a JSON object. Additionally, fill the props with content that aligns with a specified context or goal.

Variables:

tsx: The TypeScript (TSX) code snippet of the component. Value is: {tsxCode} context: The context or goal for which the props should be filled. Value is: {context}

Instructions:

Extract Props: Identify all the prop keys used in the provided TSX code. Generate JSON: Format these prop keys into a JSON structure under a "props" key, where each prop key is a property in this JSON object. Fill Props: Based on the provided context or goal, fill the prop values with appropriate content.

Example:

Input Example:

function Hero_15(⟨ announcement = 'Announcing our next round of funding. Read more →', title = 'Elevate Your Online Presence with Innovative Data Solutions', description = 'Discover how our data-driven approaches can transform your business, enhancing digital engagement and driving growth.', primaryButtonTextAttr = 'text=Get Started&link=/', secondaryButtonTextAttr = 'text=Learn More&link=/', ⟩) ⟨ return (

); ⟩

2. context: ```A landing page for a cat food shop.```
### Output Example:

⟨ "component": "Hero_15", "props": {{ "announcement": "Welcome to Purrfect Bites! Discover the best for your feline friends.", "title": "Premium Cat Food for Happy, Healthy Cats", "description": "Explore our delicious range of cat food designed to keep your pets purring with joy.", "primaryButtonTextAttr": "text=Shop Now&link=/products", "secondaryButtonTextAttr": "text=Learn More&link=/about" ⟩ }}

This prompt contains variables shown as ⟨variable_name⟩. Replace them with your own values before using.

How to Use

Use with LangChain: hub.pull("qingzhitest/component-props-gen")

Need help?

Connect with verified experts who can help you succeed.

Related Prompts

More prompts in Coding & Development

View All
Coding & Development
Universal

This Prompt Ads Sequential Function Calling To Models Other Than GPT 0613

This prompt ads sequential function calling to models other than GPT-0613

D
digitalmuse$2.99
39,910 89,588
Coding & Development
Universal

Create a personalized workout routine

Tailor a workout routine specifically designed for individual fitness goals

P
primequery$2.99
23,370 23,405
Coding & Development
Universal

GODMODE CHEATCODE

God Writes You a Letter Today. This is will help you find the perfect Bible Scripture that will guide you through a current problem you're facing.

S
signalcraft$3.99
13,574 13,622
Coding & Development
Universal

Creating a Personal Finance Tracker with [Technology/Tool]

Learn to create a personal finance tracker using [Technology/Tool]. Get code samples and budgeting tips.

F
focusqueryFree
376 385
Coding & Development
ChatGPT

Build an entire application using bubble.io with ChatGPT4

Build an entire app with bubble.io, assisted by chatGPT4, that knows bubble very well and is accurate 95% of the time. This prompt will help you maximize the quality of chatGPT assistance. Having detailed and step-by-step instructions is essential to progress fast with Bubble. This initial prompt will help you get started on a good basis. Follow it because I will make it even better.

P
promptframes$5.99
1,280 1,300
Coding & Development
Universal

Become LawyerGPT

Are you in a legal bind? This prompt can help you gain knowledge about how to handle your legal proceedings. DISCLAIMER: Please meet with a real lawyer to discuss your options.

P
promptbench$2.99
1,063 1,076