Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@builder.io/widgets

Package Overview
Dependencies
Maintainers
13
Versions
602
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@builder.io/widgets

Adds widgets for Builder.io editing, such as carousels, tabs, accordions, etc.

  • 1.2.22-7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
decreased by-5.53%
Maintainers
13
Weekly downloads
 
Created
Source

Builder Widgets

Adds widgets for Builder.io editing, such as carousels, tabs, accordions, etc.

How to use it

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)

Example

See here for a real working example in our next.js example repo

Lazy Loading

You can also lazy load these components. To do so, instead of importing the root @builder.io/widgets which synchronously registers all components, you can insteda register them with your lazy loading library of choice, and these components will only load when used in content, as needed.

Here is an example with Next.js

import { Builder } from '@builder.io/react';
import { accordionConfig } from '@builder.io/widgets/dist/lib/components/Accordion.config';
import dynamic from 'next/dynamic';

Builder.registerComponent(
  dynamic(() =>
    import('@builder.io/widgets/dist/lib/components/Accordion').then(mod => mod.AccordionComponent)
  ),
  accordionConfig
);

You can also use this same methodology with Loadable or Suspense as well.

Help and troubleshooting

Questions or feedback - contact us at help@builder.io, we are happy to help!

FAQs

Package last updated on 14 Jul 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc