Vercel launches AI Elements 1.9 with new JSXPreview and PromptInput components
New Components and Features
AI Elements 1.9 adds powerful new building blocks for developers creating AI-powered interfaces. The library now includes:
- JSXPreview Component: Dynamically renders JSX strings with native support for streaming scenarios. Automatically closes unclosed tags as content arrives, making it ideal for real-time AI-generated UI display.
- PromptInputActionAddScreenshot Sub-component: Extends the PromptInput component with screenshot capture capabilities, allowing you to send visual context to AI models for enhanced understanding.
- Conversation Download: The Conversation component now supports exporting chat history as markdown files.
Agent Skill Installation
Developers can now install the AI Elements skill directly into their preferred agent framework, improving the agent's understanding of how to compose and use AI interface elements effectively:
npx skills add vercel/ai-elements --skill ai-elements
Getting Started
Install new components using the standard command pattern:
npx ai-elements@latest add jsx-preview
npx ai-elements@latest add prompt-input
Refer to the documentation for full implementation details and usage examples. Vercel is offering a free account to get started or enterprise support for teams with advanced requirements.