
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@builder.io/widgets
Advanced tools
Adds widgets for Builder.io editing, such as carousels, tabs, accordions, etc.
Adds widgets for Builder.io editing, such as carousels, tabs, accordions, etc.
First, install the package
npm install @builder.io/widgets
When using the React SDK, just
import '@builder.io/widgets';
Anywhere that you render a <BuilderComponent ... />
, and now the widgets will register and be available in the editor and when rendering (including server side)
See here for a real working example in our next.js example repo
Instead of importing the root @builder.io/widgets
which synchronously registers all components, you can asynchrnously import only the widgets used in builder content:
To only dynamically import widgets in next.js:
import '@builder.io/widgets/dist/lib/builder-widgets-async'
You'd want to lazy load the widget components explicitly. To do so, , you can register them with your lazy loading library of choice, for e.g Loadable, and these components will only load when used in content, as needed.
import { Builder } from '@builder.io/react';
import { accordionConfig } from '@builder.io/widgets/dist/lib/components/Accordion.config';
import loadable from '@loadable/component';
Builder.registerComponent(
loadable(() =>
import('@builder.io/widgets/dist/lib/components/Accordion').then(mod => mod.AccordionComponent)
),
accordionConfig
);
You can also use this same methodology with Suspense as well.
Questions or feedback - contact us at help@builder.io, we are happy to help!
FAQs
Adds widgets for Builder.io editing, such as carousels, tabs, accordions, etc.
The npm package @builder.io/widgets receives a total of 16,594 weekly downloads. As such, @builder.io/widgets popularity was classified as popular.
We found that @builder.io/widgets demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.