Weave.js

Star

Draw a star on the canvas

Star on Weave.js showcase

The Star node is a simple, versatile primitive shape used to render star elements on the canvas. Built on top of Konva’s Star, it supports customizable properties such as amount of points, position, inner and outer radius, fill color, stroke, radius (on both axis), and more.

They can also respond to interactions like dragging, resizing, or selection.

Usage

Import the Node

Start by importing the node:

import { WeaveStarNode } from "@inditextech/weave-sdk";

Register the Node

Then register the node on the Weave class instance.

const instance = new Weave({
  ...
  nodes: [
    ...,
    new WeaveStarNode(), 
  ]
})

Use the node

Once the node is registered you can use it on Actions or Plugins or even other Nodes.

We provide two actions:

  • Star Tool that allows users to add Star nodes to the application.