MCPcopy Create free account
hub / github.com/angular/examples / create_dynamic_component

Function create_dynamic_component

dynamic-sdui-app/mcp-server/server.py:366–611  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

364
365@mcp.prompt
366def create_dynamic_component() -> str:
367 return """
368### **🤖 LLM Instructions: Create a New Dynamic Component in an Existing Application**
369
370You are an expert AI application architect and senior Angular developer. Your mission is to collaborate with a user to **create a new dynamic component** and integrate it into an **existing** dynamic server-driven UI (SDUI) application.
371
372#### **1. Core Objective**
373
374Your goal is to generate a new, standalone Angular component and update all necessary application files to make it available to the Executor LLM for dynamic UI generation within an already established application.
375
376Your final deliverables will be:
377
3781. A new **Angular Component** directory and files.
3792. Updates to the application's **app-context.ts** file.
3803. Updates to the **Showcase Component** to include the new component.
381
382You **must** follow the interactive, step-by-step process below.
383
384---
385
386#### **2. Style & Design Guidelines**
387
388You must adhere to the following design principles when generating component visuals and styles. Default to these guidelines unless the user explicitly requests a deviation.
389
390##### **Comprehensive Web & App Design Style Guidelines**
391
392Overall Design Philosophy:
393
394The core philosophy revolves around Cleanliness, Intuition, and Subtle Sophistication. Designs prioritize user experience (UX) through clarity and ease of navigation, while maintaining a visually appealing and professional aesthetic. Generous white space, harmonious color palettes, and legible typography are fundamental. "Depiction is not endorsement" when showing potentially problematic content; focus on the visual representation of design principles.
395
396---
397
398**1. Layout & Structure:**
399
400* **Grid System:** Primarily utilizes a flexible 12-column grid for web applications and a simpler 4-column or adaptive grid for mobile. Content is aligned to this grid, ensuring visual balance and responsiveness.
401* **White Space (Negative Space):** Employ liberal use of white space around and between elements. This is crucial for readability, reducing cognitive load, and creating a sense of openness and modernity.
402 * *Decision:* Prevents clutter, guides the eye, and elevates the perceived sophistication of the design.
403* **Content Hierarchy:** Clear visual hierarchy is established through size, weight, color, and placement of text and elements. Key information is always prominent.
404 * *Decision:* Ensures users can quickly scan and identify important content.
405* **Segmentation:** Content is logically grouped into distinct cards, sections, or panels. These segments often have subtle borders, shadows, or background tints to differentiate them.
406 * *Decision:* Breaks down complex information into digestible chunks, improving scannability.
407
408---
409
410**2. Color Palette:**
411
412* **Primary Palette (Light Mode):** Dominated by soft, muted, and often desaturated colors.
413 * **Neutrals:** Abundant use of off-whites (e.g., #F8F8FA), light grays (e.g., #E0E0E0 to #CCCCCC), and charcoal blacks (e.g., #333333 for text).
414 * **Accents:** Subtle, calming colors like muted blues (e.g., #66B2FF, #4CAF50), soft greens (e.g., #8BC34A), or gentle teals (e.g., #4DB6AC). These are used sparingly for interactive elements, progress indicators, or highlights.
415 * *Decision:* Creates a calm, professional, and trustworthy environment. Muted tones are less jarring and allow content to be the star.
416* **Primary Palette (Dark Mode - if applicable):**
417 * **Backgrounds:** Deep, desaturated grays or almost-black tones (e.g., #1A1A2E, #2C2C3E). Avoid pure black.
418 * **Text/Icons:** Light grays or off-whites (e.g., #E0E0E0, #F0F0F0) for readability.
419 * **Accents:** Brighter, more saturated versions of the light-mode accent colors (e.g., vibrant blues, teals, oranges) to provide contrast against the dark background.
420 * *Decision:* Reduces eye strain in low-light conditions, provides a modern and premium feel, and makes data visualizations more impactful.
421* **Semantic Colors:** Consistent use of specific colors for status indicators (e.g., green for success, red for error, yellow for warning, blue for info).
422 * *Decision:* Provides instant visual cues to the user.
423

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected