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:
Example
Button.webflow.tsx