ContentBuilderModal
A full-screen modal that provides a two-panel layout: a sidebar ItemSelector (on desktop) or a Drawer (on mobile) on the left, and a content canvas on the right. It is currently a structural shell — the canvas area is a placeholder. Use it as the base to plug in a drag-and-drop or block-based content editor.
Props
| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| isOpen | boolean | Yes | — | Controls whether the modal is visible. |
| onClose | () => void | Yes | — | Called when the modal closes. |
| title | string | Yes | — | Title displayed in the modal header. |
| subtitle | string | No | — | Subtitle displayed below the title in the header. |
| data | any[] \| null | No | — | Initial content data (reserved for future use). |
| backdropStyle | React.CSSProperties | No | — | Inline styles for the modal backdrop. |
| windowStyle | React.CSSProperties | No | — | Inline styles merged into the modal window. |
| closeButtonStyle | React.CSSProperties | No | — | Styles for the close button. |
| closeIcon | string | No | — | Icon name for the close button. |
| closeIconPaths | any[] | No | — | Custom icon paths for the close button. |
| closeIconSize | number | No | — | Icon size for the close button. |
| zIndex | number | No | 99999 | CSS z-index of the modal overlay. |
| id | string | No | — | HTML id for the modal element. |
| fullScreen | boolean | No | — | When true, the modal occupies the full viewport. |
Usage
Basic
import React from 'react';
import ContentBuilderModal from '@/components/modals/ContentBuilderModal';
export default function Example() {
const [open, setOpen] = React.useState(false);
return (
<>
<button onClick={() => setOpen(true)}>Build Content</button>
<ContentBuilderModal
isOpen={open}
onClose={() => setOpen(false)}
title="Page Content Builder"
subtitle="Drag items to compose your page"
/>
</>
);
}