// for example, in my-custom-components.ts import { type RegisteredComponent } from "@builder.io/sdk-react"; import { MyFunComponent } from "./MyFunComponent"; export const customComponents: RegisteredComponent[] = [ { component: MyFunComponent, // ---> You could also lazy load your component using: // component: React.lazy(() => import('./MyFunComponent')), name: 'MyFunComponent', inputs: [ { name: 'text', type: 'string', defaultValue: 'Hello world', }, ], }, ];
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter