SitecoreAI Connector
Developer Integration
Overview

Developer Integration

Learn how to work with selected Bynder assets in your SitecoreAI components using the Bynder DAM Connector SDK.

Overview

Once content authors select Bynder assets in Sitecore Pages, the selected assets are stored as JSON data in the BynderDamSingleFile field. Developers can access and use this data in their components through the Bynder DAM Connector SDK - a TypeScript-first React component library designed for easy integration.

Getting Started

Install the SDK Package

The Bynder DAM Connector SDK is available as an npm package and works with Next.js (App Router or Pages Router), Sitecore JSS, Sitecore Content SDK, Create React App, Vite, and any React environment:

npm install @neworange/bynder-dam-connector-sitecoreai-sdk

Core Components

The SDK provides four ready-to-use React components for rendering Bynder assets:

  • BynderDamImage - Standard <img> tag for any React environment
  • BynderDamNextImage - Next.js <Image> component with optimization
  • BynderDamLink - Render Bynder assets as links
  • BynderDamVideo - Render video assets with smart derivative selection

All components include:

  • Full TypeScript support with comprehensive type definitions
  • Derivative selection with graceful fallback logic
  • Customizable styling via className and other props
  • Error handling that never throws
  • Minimal bundle size with proper tree-shaking

Next Steps

Best Practices

Error Handling

SDK components handle errors gracefully and never throw:

<BynderDamImage
  asset={asset}
  alt="Product"
  onError={(error) => console.log('Failed to load image', error)}
/>

Performance Optimization

  • Use BynderDamNextImage in Next.js for automatic optimization
  • Use the loading="lazy" attribute for below-the-fold images
  • SDK automatically selects optimized derivatives when available
  • Minimal bundle size means tree-shaking unused components

Styling

Pass standard HTML attributes and classNames:

<BynderDamImage
  asset={asset}
  alt={asset.name}
  className="rounded-lg shadow-md"
  width={400}
  height={300}
/>

Resource Links