How-to
How to sync an empty state between canvas and TSX
A practical id-contract checklist for keeping an empty state editable on the BluePainter canvas and in code.
Goal
Keep an empty state editable on the canvas and in TSX without losing comments or formatting.
Id contract
<section id="empty-state-frame" style={{ padding: 32 }}>
<button id="empty-state-cta" style={{ background: '#2563eb' }}>Start free trial</button>
</section>
The id is the join key between a canvas layer and its JSX element. Synced fields today: inline style, text, and img src.
Steps
- Open the empty state in BluePainter (or the VS Code extension)
- Give every layer you want to edit visually a stable, unique
id— the TSX id analyzer lists what the canvas can map - Edit on the canvas or in code; receipts flag policy issues as you go
- Export or write back when the diff looks right
See the FAQ for what is and is not synced.