Components in Content SDK apps
A Content SDK component is similar to a front-end component and is defined in much the same way as a component in your library of choice.
Unlike regular JavaScript components, Content SDK components can have properties populated with content. When connecting your app to an SitecoreAI instance, that data comes from SitecoreAI endpoints.
Content authors build pages that contain components. These components are registered in a component map in Content SDK. Calling a route returns the layout response containing components with their content. Then, the component map is used to determine which component should be rendered.
To enable visual editing in the Page Builder and content-driven rendering in SitecoreAI, each rendering in a page must have a corresponding component in the Content SDK component map and use the available field helpers. This registration allows the Content SDK to integrate with SitecoreAI and provide layout-based editing capabilities.
You can create components in a Content SDK app that aren't bound to SitecoreAI layout data. These components will still render as part of your application, but they won't be editable in the Page Builder and will lack layout-based personalization or content delivery.
Creating components with the CLI
You can use the Content SDK CLI to create new components with the scaffold command, which supports optional parameters for using a custom config file and custom component templates, if required.