This is an overview of the changes to the Webflow APIs and related tools. To filter the list, select one or more tags.
This is an overview of the changes to the Webflow APIs and related tools. To filter the list, select one or more tags.
v1.9.0: Component decorator support
v1.9.0 adds support for component decorators, enabling you to wrap all components in your library with providers for global styles, CSS-in-JS libraries, or custom functionality.
Configure a global decorators file in your webflow.json to apply decorators across all components:
The CLI will automatically wrap all components with the decorators exported from your globals file during the build process.
Learn more in the component decorators documentation.
This update introduces component decorators, a new pattern for applying global styles and wrapping components with providers. Configure globally to apply to every component in your library or locally to a single component.
Packages:
@webflow/webflow-cli 1.9.0@webflow/react 1.1.0@webflow/data-types 1.1.0@webflow/emotion-utils 1.1.0@webflow/styled-components-utils 1.1.0Instead of importing styles or adding decorators to each component individually, you can now configure them once in a global decorators file.
Configure in webflow.json:
Import CSS once and apply it to all components:
For Emotion and styled-components, export the pre-built decorators to inject styles into the Shadow DOM:
Pre-built decorators:
emotionShadowDomDecorator from @webflow/emotion-utilsstyledComponentsShadowDomDecorator from @webflow/styled-components-utilsSee more on pre-built decorators in the frameworks and libraries guide.
Create custom decorators for error handling, analytics, or other cross-cutting concerns:
To apply decorators to a single component, add a decorators property to the declareComponent configuration object.
Learn more in the component decorators documentation.