Skip to main content

Install

React 18 and 19 are both supported.

LogoSoup Component

The fastest way to get started. Drop it in and it handles everything:
The component renders a centered, balanced row of logos with a fade-in transition. It returns null if all images fail to load.

Component Props

All shared options are supported as props, plus these React-specific ones:

useLogoSoup Hook

For custom layouts, use the hook directly:

Return Value

Custom Image Component

Use renderImage to integrate with Next.js Image, Remix, or add custom attributes:

Next.js Image

Lazy loading

Visual Center Alignment

When using the hook, apply visual center alignment with getVisualCenterTransform:
This compensates for logos with asymmetric visual weight (e.g., a logo where the icon is heavier on one side). The <LogoSoup> component applies this automatically via the alignBy prop.

SSR

The hook provides a getServerSnapshot that returns an idle state during server rendering. Logos are always processed client-side (canvas is required). The component renders an empty container on the server and hydrates with normalized logos on the client.

How It Works Under the Hood

The React adapter uses useSyncExternalStore to subscribe to the core engine. The engine is created once in a useRef and destroyed on unmount. The logos array reference is stabilized internally (deep comparison by src) to prevent infinite re-render loops when consumers pass inline array literals.