create_node
Draws frames, rectangles, text, and other visual elements live on the FigCraft canvas, cleaning newline characters and preventing text overflow.
Instructions
Langkah 3 Kanonik: Gambar elemen visual (frame, rectangle, text, ellipse, button, dll) secara LIVE langsung di kanvas dengan pembersihan otomatis karakter \n dan perlindungan otomatis dari teks meluber (textAutoResize: "height").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Posisi X relatif terhadap parent | |
| y | No | Posisi Y relatif terhadap parent | |
| name | No | Nama layer | |
| text | No | Isi teks (jika type = text, otomatis disanitasi dari literal \n dan dibungkus rapi) | |
| type | Yes | Tipe node layer | |
| props | No | Properti visual: fills, strokes, cornerRadius, cornerSmoothing, effects, fontSize, fontFamily, fontWeight, layout, gap, padding, textAutoResize, dll. | |
| width | No | Lebar layer dalam pixel | |
| height | No | Tinggi layer dalam pixel | |
| parent | No | ID parent frame (default: current page) |