Define a code component
declareComponent(Component, data)
The declareComponent function is used to create a code component declaration. See the declare code component guide for more information.
Syntax
Parameters
Component: The React component to declareData: An object with: Component metadata, prop definitions, and optional configurations
Data object
The data object is used to define the component’s metadata, prop definitions, and optional configurations. It takes the following properties:
Reserved prop names
Webflow reserves prop names that start with __wf_, in any letter case. The CLI rejects a library that declares one when you bundle it.
Example
Button.webflow.tsx