Design Rich Menu Image (Rich Menu Studio)
line_design_rich_menu_imageDesign LINE rich menu PNGs from labels with Thai typography support, preview, then deploy to your Official Account.
Instructions
Design a professional LINE rich menu PNG from labels alone — pure-JS renderer with Thai typography (LINE Seed / Prompt / Noto), then optionally deploy to LINE in the same call. No design tool or headless browser.
ALWAYS preview first: mode="preview" (default) returns the PNG as an image block — LOOK at it, iterate with the user, then call again mode="deploy". mode="save" writes the PNG to disk.
Templates (cells filled in reading order; tap areas auto-derived from the same geometry, pixel-perfect):
grid_6 (2500x1686, 6 cells): 3×2 grid, 6 equal cells — the classic LINE OA menu
grid_4 (2500x1686, 4 cells): 2×2 grid, 4 large cells
hero_top_3 (2500x1686, 4 cells): full-width hero banner on top + 3 cells below
hero_left_2 (2500x1686, 3 cells): left-half hero + 2 stacked cells on the right
split_2 (2500x1686, 2 cells): two tall vertical halves
full_1 (2500x1686, 1 cells): one full-canvas cell (single campaign banner)
compact_3 (2500x843, 3 cells): compact 1×3 row
compact_2 (2500x843, 2 cells): compact 1×2 row
compact_1 (2500x843, 1 cells): compact single full-width cell
cells[] length MUST equal the template's cell count; per-cell action is required only for deploy. brand auto-corrects label contrast for readability. deploy needs deploy:{ name, set_default?, alias? } and auto-deletes the orphaned menu on any post-create failure; LINE caps the PNG at <1MB (gradients auto-flatten to solid once).
Returns preview → PNG image block + { width, height, bytes, template, font_used, warnings[] }; deploy → { rich_menu_id, areas_count, set_default, alias? }.
Example: "ทำเมนูร้านกาแฟ 6 ปุ่ม สีเขียว" → { template:"grid_6", brand:{primary:"#06C755"}, cells:[{label:"สั่งเลย", icon_emoji:"☕", action:{type:"uri", uri:"https://shop.line.me/@cafe"}}, ...5 more] }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| oa | No | OA id (multi-OA). Omit to use active OA. | |
| mode | No | preview (default) returns the PNG for inspection; save writes it; deploy goes live. | preview |
| size | No | Optional; defaults to the template's native size (large templates → 2500x1686, compact_* → 2500x843). Errors if it contradicts the template. | |
| brand | No | Brand kit. Omit for the tasteful default palette. | |
| cells | Yes | One entry per template cell, in reading order (left→right, top→bottom) | |
| deploy | No | Required when mode='deploy'. | |
| template | Yes | Layout template. grid_6 is the classic 3×2 LINE OA menu. | |
| output_path | No | save mode: where to write the PNG. Default ./rich-menu-<template>.png | |
| chat_bar_text | No | Chat-bar button label (≤14 chars). Default "เมนู". |