Skip to content

v0.4.0

Choose a tag to compare

@dannote dannote released this 18 Jan 18:14
· 233 commits to master since this release

Added

  • defineVars API for Figma variables — bind colors to variables by name
    const colors = defineVars({
      primary: { name: 'Colors/Gray/50', value: '#F8FAFC' },
      accent: { name: 'Colors/Blue/500', value: '#3B82F6' },
    })
    <Frame style={{ backgroundColor: colors.primary }} />
  • Variable binding for backgroundColor, borderColor, and text color
  • Variables resolved by name at render time (no more magic IDs)
  • defineVars support in stdin snippets
  • Explicit fallback values in defineVars for proper color display

Fixed

  • Auto-layout now works correctly via trigger-layout post-render
  • Nested auto-layout frames trigger recursively
  • Variable binding encoding matches Figma's exact wire format

Changed

  • Marked React render and variable bindings as experimental in docs