|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: Create a React PDF Viewer with Agentic UI Builder | Syncfusion |
| 4 | +description: Learn how to use the React PDF Viewer component of Syncfusion Essential JS 2 with Agentic UI Builder. |
| 5 | +control: PDF Viewer |
| 6 | +platform: document-processing |
| 7 | +documentation: ug |
| 8 | +domainurl: ##DomainURL## |
| 9 | +--- |
| 10 | + |
| 11 | +# Create a React PDF Viewer with Agentic UI Builder |
| 12 | + |
| 13 | +This article explains how to build a Syncfusion® React PDF Viewer by entering natural-language instructions into the [**Syncfusion® React Agentic UI Builder**](https://www.syncfusion.com/explore/mcp-servers/) (which runs on Syncfusion's MCP Server). Describe your requirements, and the tool will generate a complete PDF Viewer implementation. |
| 14 | + |
| 15 | +### Prerequisites |
| 16 | + |
| 17 | +- Ensure the **React Agentic UI Builder** extension is installed in your IDE. See the official [Getting Started](https://ej2.syncfusion.com/react/documentation/mcp-server/agentic-ui-builder/getting-started) and [installation guide](https://ej2.syncfusion.com/react/documentation/mcp-server/installation). |
| 18 | +- Have an existing React project ready (JavaScript or TypeScript, any supported version) before using the Agentic UI Builder. |
| 19 | + |
| 20 | +### Usage |
| 21 | + |
| 22 | +After installation, open your React project in your IDE, launch the AI assistant, and run the ```#sf_react_ui_builder``` command describing the UI you want. For example: |
| 23 | + |
| 24 | +**Example:** |
| 25 | + |
| 26 | +``` |
| 27 | +#sf_react_ui_builder Create standalone React PDF Viewer using the Bootstrap 5 theme with the default modules. Install the required packages, import the theme CSS in the correct order, and initialize the PDF Viewer. |
| 28 | +``` |
| 29 | + |
| 30 | +The UI Builder generates complete implementations including layout, components, and styling. A preview of the generated output appears below: |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +### Individual Tools |
| 35 | + |
| 36 | +You can invoke specific tools by name for focused assistance; besides the main UI Builder, there are tools for layout, styling, and components. See the [individual tools documentation](https://ej2.syncfusion.com/react/documentation/mcp-server/agentic-ui-builder/getting-started#individual-tools) for details. |
| 37 | + |
| 38 | +### Tips & Best Practices |
| 39 | + |
| 40 | + - Turn on **Agent mode** in your IDE to enable smooth, multi-step operations with confirmation prompts. |
| 41 | + - Use **Claude Sonnet 4.5 or newer** models for best results; higher-capability models typically produce more accurate, higher-quality code. |
| 42 | + - If a step times out or becomes unresponsive, cancel it and retry. |
| 43 | + - Review the generated code and commands before applying them in a production environment. |
| 44 | + |
| 45 | +### See Also |
| 46 | + |
| 47 | +- For examples of prompt patterns and customization options for layouts, components, and styles, refer to the [prompt Library](https://ej2.syncfusion.com/react/documentation/mcp-server/agentic-ui-builder/prompt-library). |
0 commit comments