How-to

How to sync a hero section between canvas and TSX

A practical id-contract checklist for keeping a hero section editable on the BluePainter canvas and in code.

Goal

Keep a hero section editable on the canvas and in TSX without losing comments or formatting.

Id contract

<section id="hero-section-frame" style={{ padding: 32 }}>
  <button id="hero-section-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

  1. Open the hero section in BluePainter (or the VS Code extension)
  2. Give every layer you want to edit visually a stable, unique id — the TSX id analyzer lists what the canvas can map
  3. Edit on the canvas or in code; receipts flag policy issues as you go
  4. Export or write back when the diff looks right

See the FAQ for what is and is not synced.

← All guides · Request a pilot