Rectangle

Draw rectangles with optional rounded corners

draw 1 credit

Rectangle

Draw rectangles with optional rounded corners

Overview

The Rectangle node draws a rectangle on a transparent canvas. Create filled or outlined rectangles with optional rounded corners for buttons, frames, and UI elements.

Usage Tips

  • Use corner_radius for rounded rectangles (0 = sharp corners)
  • Set stroke_width > 0 and fill = false for outlined rectangles
  • Output image size matches the specified dimensions exactly
  • Great for creating buttons, cards, and frame overlays

Common Pairings

  • Merge - Add rectangular frames or backgrounds to images
  • Text - Layer text on rectangular buttons
  • Composite - Build UI mockups with multiple rectangles

Gotchas

  • Corner radius can’t exceed half the smaller dimension
  • Stroke extends inward from rectangle edges
  • For complex shapes, consider using multiple rectangles with Composite

Technical Reference

Outputs

NameTypeDescription
outputImageRendered rectangle image

Parameters

NameTypeDefaultDescription
params_sizesizemap[height:300 width:400]Rectangle dimensions (width, height)
params_colourcolor#0000FFFill or stroke color
params_stroke_widthnumber0Stroke width (0 for filled)
params_fillbooleantrueFill the rectangle (true) or just outline (false)
params_corner_radiusnumber0Corner radius for rounded rectangles