create_rectangle
Add a rectangle to a Penpot file with customizable fill, gradient, image, border, corner radius, shadow, blur, and blend mode settings.
Instructions
Create a rectangle shape with colors, gradients, images, borders, rounded corners, shadows, blur, and blend modes
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X position | |
| y | No | Y position | |
| r1 | No | Top-left corner radius | |
| r2 | No | Top-right corner radius | |
| r3 | No | Bottom-right corner radius | |
| r4 | No | Bottom-left corner radius | |
| name | No | Shape name | Rectangle |
| width | No | Width | |
| fileId | Yes | File ID | |
| height | No | Height | |
| pageId | Yes | Page ID | |
| opacity | No | Overall shape opacity (0-1) | |
| blendMode | No | Blend mode: "normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity" | normal |
| blurValue | No | Blur intensity in pixels (for glassmorphism effect) | |
| fillColor | No | Fill color (HEX, e.g., "#FF0000") | |
| shadowBlur | No | Shadow blur radius in pixels | |
| fillImageId | No | Image media ID (from upload_file_media) | |
| fillOpacity | No | Fill opacity (0-1) | |
| shadowColor | No | Shadow color (HEX, e.g., "#000000") | #000000 |
| shadowStyle | No | Shadow style: "drop-shadow" or "inner-shadow" | drop-shadow |
| strokeColor | No | Stroke color (HEX) | |
| strokeWidth | No | Stroke width in pixels | |
| borderRadius | No | All corners radius (shorthand for r1-r4) | |
| gradientEndX | No | Gradient end X (0-1 normalized) | |
| gradientEndY | No | Gradient end Y (0-1 normalized) | |
| gradientType | No | Gradient type: "linear" or "radial" | |
| shadowSpread | No | Shadow spread in pixels | |
| fillImageName | No | Image name | |
| gradientStops | No | Gradient stops as JSON array, e.g., '[{"color":"#667eea","opacity":1,"offset":0},{"color":"#764ba2","opacity":1,"offset":1}]' | |
| shadowOffsetX | No | Shadow X offset in pixels | |
| shadowOffsetY | No | Shadow Y offset in pixels | |
| shadowOpacity | No | Shadow opacity (0-1) | |
| strokeOpacity | No | Stroke opacity (0-1) | |
| fillImageMtype | No | Image MIME type | image/png |
| fillImageWidth | No | Image width in pixels | |
| gradientStartX | No | Gradient start X (0-1 normalized) | |
| gradientStartY | No | Gradient start Y (0-1 normalized) | |
| fillImageHeight | No | Image height in pixels | |
| fillImageKeepAspectRatio | No | Keep image aspect ratio |