Get canvas width/height of a code component

Code
Code Component
Framer
Updated: 2018-09-14

Framer passes width/height props to all component instances on the canvas. You can use them to make your own components resizable.

class CodeComp extends React.Component {
  render() {
    const { width, height } = this.props
    return (
      <Frame width={width} height={height}>
        ...
      </Frame>
    )
  }
}