Skip to content

Components

Woven Canvas exports various Vue components for building your canvas UI.

Pre-built block renderers you can use directly or as reference:

ComponentDescription
ShapeBlockRenders shape blocks (rectangle, ellipse, etc.)
TextBlockRenders text blocks with rich text support
ImageBlockRenders image blocks
PenStrokeRenders freehand pen strokes
ArcArrowRenders curved arrow connectors
ElbowArrowRenders right-angle arrow connectors
EraserRenders eraser cursor indicator
import {
ShapeBlock,
TextBlock,
ImageBlock,
PenStroke,
ArcArrow,
ElbowArrow,
} from "@woven-canvas/vue";

Toolbar tool buttons:

ComponentDescription
SelectToolSelection and transform tool
HandToolPan/drag tool
ShapeToolShape creation tool
TextToolText block creation tool
StickyNoteToolSticky note creation tool
ImageToolImage upload tool
PenToolFreehand drawing tool
EraserToolEraser tool
ArcArrowToolCurved arrow tool
ElbowArrowToolRight-angle arrow tool
import {
SelectTool,
HandTool,
ShapeTool,
TextTool,
StickyNoteTool,
ImageTool,
PenTool,
EraserTool,
ArcArrowTool,
ElbowArrowTool,
} from "@woven-canvas/vue";
ComponentDescription
ToolbarThe main toolbar container
ToolbarButtonIndividual toolbar button
PropTypeDescription
namestringUnique tool identifier
tooltipstringTooltip text
placementSnapshotstringJSON snapshot for click-to-place
dragOutSnapshotstringJSON snapshot for drag-to-create
cursorstringCSS cursor when active
ComponentDescription
FloatingMenuContainer for the floating menu
FloatingMenuBarDefault floating menu bar layout
MenuButtonButton styled for floating menu
MenuDropdownDropdown panel for menu options
MenuTooltipTooltip for menu buttons
ComponentDescription
ColorButtonColor picker button
ColorPickerColor picker dropdown
ShapeKindButtonShape type selector
ShapeFillColorButtonShape fill color picker
ShapeStrokeColorButtonShape stroke color picker
ArrowThicknessButtonArrow line thickness
ArrowHeadButtonArrow head style selector
ComponentDescription
TextBoldButtonToggle bold
TextItalicButtonToggle italic
TextUnderlineButtonToggle underline
TextColorButtonText color picker
TextAlignmentButtonText alignment selector
TextFontSizeButtonFont size selector
TextFontFamilyButtonFont family selector
import {
TextBoldButton,
TextItalicButton,
TextUnderlineButton,
TextColorButton,
TextAlignmentButton,
TextFontSizeButton,
TextFontFamilyButton,
} from "@woven-canvas/vue";
ComponentDescription
CanvasBackgroundCanvas background (grid/dots)
UserPresenceUser avatar list
LoadingOverlayLoading indicator
EditableTextRich text editor component
import {
Shape, // Shape kinds (Rectangle, Ellipse, etc.)
StrokeKind, // Stroke styles (Solid, Dashed, Dotted)
TextAlignment, // Text alignment (Left, Center, Right, Justify)
CursorKind, // Cursor types
SHAPES, // Shape definitions array
CURSORS, // Cursor definitions map
ARROW_HEADS, // Arrow head definitions array
} from "@woven-canvas/vue";
const Shape = {
Rectangle: "rectangle",
Ellipse: "ellipse",
Triangle: "triangle",
Diamond: "diamond",
Pentagon: "pentagon",
Hexagon: "hexagon",
Star: "star",
RoundedRectangle: "rounded-rectangle",
} as const;
const TextAlignment = {
Left: "left",
Center: "center",
Right: "right",
Justify: "justify",
} as const;
const StrokeKind = {
Solid: 0,
Dashed: 1,
Dotted: 2,
} as const;