Color
RGBA color represented as a tuple of four numbers.Red component (0-255)
Green component (0-255)
Blue component (0-255)
Alpha component (0-255)
Point
Represents a 2D coordinate point.X-coordinate
Y-coordinate
TransformProps
Base transformation properties for positioned elements.X-axis translation in pixels
Y-axis translation in pixels
Rotation angle in degrees
Horizontal scale factor
Vertical scale factor
ShapeProps
Props for the Shape component. Shapes can contain geometry children (Rect, Circle, Path) to define their appearance.Visual Properties
Fill color as RGBA tuple [R, G, B, A], each component 0-255
Stroke color as RGBA tuple [R, G, B, A], each component 0-255
Width of the stroke in pixels
Opacity value from 0 (transparent) to 255 (opaque)
Stroke Styling
Stroke dash pattern as an array of lengths
Offset for stroke dash pattern in pixels
Join style for stroke corners. See StrokeJoin
Miter limit for stroke joins
Fill Styling
Transform Properties
Inherits all properties from TransformProps.RectProps
Props for the Rect component. Must be a child of a Shape component to be rendered.X-coordinate of the rectangle’s top-left corner
Y-coordinate of the rectangle’s top-left corner
Width of the rectangle in pixels
Height of the rectangle in pixels
Horizontal corner radius for rounded rectangles
Vertical corner radius for rounded rectangles
CircleProps
Props for the Circle component. Must be a child of a Shape component to be rendered.X-coordinate of the circle’s center
Y-coordinate of the circle’s center
Radius for a perfect circle
Horizontal radius for an ellipse
Vertical radius for an ellipse
Use either
radius for a perfect circle, or rx and ry for an ellipse.PathProps
Props for the Path component. Must be a child of a Shape component to be rendered.Array of path command types. Use PathCommand constants:
PathCommand.MoveTo- Move to a pointPathCommand.LineTo- Draw line to a pointPathCommand.CubicTo- Draw cubic bezier curvePathCommand.Close- Close the path
Array of points corresponding to the commands. Each command consumes a different number of points:
MoveTo: 1 point (x, y)LineTo: 1 point (x, y)CubicTo: 3 points (control1, control2, end)Close: 0 points
SceneProps
Props for the Scene component. Scenes can contain multiple Shape children and other nested Scenes.Opacity value from 0 (transparent) to 255 (opaque)
Transform Properties
Inherits all properties from TransformProps.SwCanvasProps
Props for the SwCanvas component (software-rendered canvas).Width of the canvas in CSS pixels
Height of the canvas in CSS pixels
Device pixel ratio for high-DPI displays
Optional function to customize the location of WebAssembly files. Useful for custom asset paths or CDN configurations.
SwCanvasProps also extends all standard HTML canvas element props (className, style, etc.)
GlCanvasProps
Props for the GlCanvas component (WebGL-rendered canvas).Required unique ID for the canvas element. Used by WebGL context to bind to the canvas.
Width of the canvas in CSS pixels
Height of the canvas in CSS pixels
Device pixel ratio for high-DPI displays
Optional function to customize the location of WebAssembly files. Useful for custom asset paths or CDN configurations.
GlCanvasProps also extends all standard HTML canvas element props (className, style, etc.)