Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Code Editor
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Visual Editor
- Typography
Get Started
"use client"
import * as React from "react"Installation
pnpm dlx openteam-ui@latest add visual-editor
Usage
import * as React from "react"
import {
VisualEditor,
type VisualEditorHandle,
} from "@/components/ui/visual-editor"
export function CampaignBuilder() {
const editorRef = React.useRef<VisualEditorHandle>(null)
const [source, setSource] = React.useState<string | null>(null)
return (
<VisualEditor
ref={editorRef}
scriptSrc="/email-builder/email-builder.umd.js"
source={source}
onChange={({ source }) => setSource(source)}
onMediaRequest={() => {
editorRef.current?.insertMedia("https://example.com/image.png")
}}
/>
)
}Notes
scriptSrcmust point to a same-origin bundle. Self-host the editor asset under your app domain instead of loading a third-party CDN URL.- The component forwards a ref with
insertMedia,reload, andresetDocument. - Use
onMediaRequestto open your own asset picker, then callinsertMedia(url)with the chosen file.
Deploy your openteam.ai app on Vercel
Trusted by OpenAI, Sonos, Adobe, and more.
Vercel provides tools and infrastructure to deploy apps and features at scale.
Deploy to Vercel