VibeFrame
VibeFrame renders AI-generated React components in a sandboxed iframe. It handles code compilation, data passing, auto-resizing, and error handling—all while maintaining strict security isolation.Basic Usage
Props
How It Works
1. Code Compilation
When you providecode, VibeFrame generates a data URL containing:
- React 18 (loaded from CDN)
- Babel standalone (for JSX compilation)
- Tailwind CSS (loaded from CDN)
- Your component code
2. PostMessage Bridge
The iframe and parent communicate via PostMessage:3. Auto-Resize
The iframe automatically resizes based on content:minHeight and maxHeight.
Security Model
Sandbox Restrictions
- ✅ Allows JavaScript execution
- ❌ Blocks same-origin access (can’t read parent DOM)
- ❌ Blocks form submission
- ❌ Blocks popups and new windows
- ❌ Blocks top-level navigation
- ❌ Blocks plugins