Skip to content
D
Documentation

VNodeProps

reference
2 min readUpdated

Import it from @grafloria/renderer.

VNode properties supporting SVG attributes, styles, and event handlers

ts
interface VNodeProps

Properties

NameTypeDefaultDescription
x?numberX coordinate
y?numberY coordinate
width?numberWidth
height?numberHeight
rx?numberBorder radius X (rounded corners)
ry?numberBorder radius Y (rounded corners)
cx?numberCircle center X
cy?numberCircle center Y
r?numberCircle radius
x1?numberLine start X
y1?numberLine start Y
x2?numberLine end X
y2?numberLine end Y
d?stringSVG path data (d attribute)
fill?stringFill color
stroke?stringStroke color
strokeWidth?numberStroke width
strokeDasharray?stringStroke dash array (dashed lines)
opacity?numberOpacity (0-1)
transform?stringSVG transform attribute
textContent?stringText content
fontSize?numberFont size (in pixels)
fontFamily?stringFont family
textAnchor?'start' | 'middle' | 'end'Text anchor (alignment)
className?stringCSS class names (space-separated)
containerId?stringContainer ID for foreignObject elements Used by ComponentRenderer to target the specific foreignObject for Angular component injection
requiredExtensions?stringSVG foreignObject requiredExtensions attribute Specifies SVG extensions required for rendering
xmlns?stringXML namespace (typically for XHTML in foreignObject) Example: 'http://www.w3.org/1999/xhtml'
style?Record<string, any> | stringInline style: either a declaration map, or a raw CSS string.
onClick?(e: Event) => voidClick event handler
onMouseEnter?(e: Event) => voidMouse enter event handler
onMouseLeave?(e: Event) => voidMouse leave event handler
onMouseDown?(e: Event) => voidMouse down event handler

Was this page helpful?

VNodeProps — Grafloria