Overview
Block Designer provides a set of components for building form editors. BlockSelectorPanel shows available block types with search filtering. BlockPropertiesPanel displays and edits selected block configuration. These components work together within LayoutBlockDesigner.
Key Features
- Filter-as-you-type block search with Enter to add
- Drag-and-drop support for block positioning
- Categorized block palette with visual icons
- Real-time property editing with auto-save
Components
BlockSelectorPanel
Left sidebar panel with search input and categorized block palette. Supports filter-as-you-type—when only one block matches, press Enter to add it instantly.
BlockPropertiesPanel
Right sidebar panel displaying selected block properties. Shows basic settings, type-specific configuration, access control, and advanced options.
BlockCanvas
Central area displaying the form structure with inline-editable resource header and draggable block cards.
Block Search
The search input filters blocks by name, type, or category as you type. When the search narrows to a single result, press Enter to immediately add that block to your form.
Pro tip: Type the first few letters of a block type and press Enter for quick insertion.
// BlockSelectorPanel search behavior: // 1. Type to filter blocks by name, type, or category // 2. Results update instantly as you type // 3. When only ONE block matches, press Enter to add it // 4. Clear search after adding a block // Example: Type "rat" → only "Rating Scale" matches // Press Enter → Rating Scale block added to form
Live Demo
BlockSelectorPanel
Interactive BlockSelectorPanel with search
Added Blocks
Click a block or use search + Enter to add blocks. They will appear here.
Props Reference
BlockSelectorPanel Props
| Prop | Type | Default | Description |
|---|---|---|---|
onAddBlock | (type: string) => void | required | Called when a block is clicked or selected via Enter |
disabled | boolean | false | Disable the panel and search input |
Usage
Standalone Component
import { BlockSelectorPanel } from '@/ui/blocks/dynamic-block/components';
<BlockSelectorPanel
onAddBlock={(type) => {
// Add block of this type to your form
addBlockToForm(type);
}}
disabled={false}
/>With LayoutBlockDesigner
import { LayoutBlockDesigner } from '@/ui/layouts';
import { BlockSelectorPanel, BlockPropertiesPanel, BlockCanvas } from '@/ui/blocks/dynamic-block/components';
// LayoutBlockDesigner provides the 4-panel structure:
// - Left: WizardNav (steps) + BlockSelectorPanel (with search)
// - Center: BlockCanvas
// - Right: BlockPropertiesPanel
// - Bottom: WizardBar (navigation)
<LayoutBlockDesigner
steps={steps}
leftSidebar={<BlockSelectorPanel onAddBlock={handleAddBlock} />}
rightSidebar={<BlockPropertiesPanel selectedBlock={selectedBlock} />}
canvas={<BlockCanvas blocks={blocks} />}
onBack={handleBack}
onNext={handleNext}
/>