Documentation
v1.0.0
UI Component
📝

Prompt Block

Individual block component for rendering different block types

The Prompt Block component is responsible for rendering individual blocks in the visual editor. It provides a consistent interface for displaying different block types with editing capabilities, drag handles, and contextual actions.

Usage Example

Basic Implementation
import { PromptBlock } from '@vibecode/core';

<PromptBlock
  block={block}
  isSelected={selectedBlockId === block.id}
  isFocused={focusedBlockId === block.id}
  onUpdate={handleUpdateBlock}
  onDelete={handleDeleteBlock}
  onFocus={handleFocusBlock}
  onDragStart={handleDragStart}
  onDragEnd={handleDragEnd}
/>