Skip to main content
These options are shared across every framework adapter. They’re passed as component props (React), composable args (Vue), or process() options (Svelte/Solid/Angular/Vanilla).

Core Options

logos

(string | { src: string; alt?: string })[]
required
Array of logo URLs or objects with src and optional alt text. Use objects to provide accessible alt text for each logo.

baseSize

number
default:"48"
Target size for logos in pixels. This is the baseline that all normalization is relative to. Larger values produce larger logos.

scaleFactor

number
default:"0.5"
Controls how logos with different aspect ratios are balanced. This uses Dan Paquette’s technique where the normalized width is calculated as aspectRatio ^ scaleFactor * baseSize.Imagine two logos: Logo A is wide (200×100) and Logo B is tall (100×200).scaleFactor = 0 — Same width for all:
  • Logo A: 48×24 (short)
  • Logo B: 48×96 (very tall)
scaleFactor = 1 — Same height for all:
  • Logo A: 96×48 (very wide)
  • Logo B: 24×48 (narrow)
scaleFactor = 0.5 — Balanced:
  • Neither gets too wide nor too tall
  • Looks most natural

densityAware

boolean
default:"true"
When enabled, Logo Soup measures the “visual weight” (pixel density) of each logo and adjusts sizing accordingly. Dense, solid logos get scaled down. Light, thin logos get scaled up.Set to false to disable density compensation entirely.

densityFactor

number
default:"0.5"
Controls how strongly density affects the result. Only applies when densityAware is true.

cropToContent

boolean
default:"false"
When enabled, logos are cropped to their detected content bounds and re-rendered as blob URLs. This removes any whitespace or padding baked into the original image files.The cropped images are available as logo.croppedSrc on each NormalizedLogo object.
Cropping creates blob URLs that are cleaned up when the engine is destroyed. Don’t store croppedSrc values beyond the engine’s lifetime.

contrastThreshold

number
default:"10"
Minimum contrast distance (in RGB space) for a pixel to be considered “content” during content detection. Higher values ignore more low-contrast details near the background color.You rarely need to change this. Increase it if logos with very subtle gradients or shadows are getting incorrect bounds.

backgroundColor

string | [number, number, number]
The background color the logos will be displayed on. Used for two things:
  1. Contrast detection on opaque logos (logos without transparency) — the engine needs to know the background to distinguish content from the background
  2. Irradiation compensation — light logos on dark backgrounds appear optically larger; this option enables the correction
Accepts CSS color strings ("#1a1a1a", "rgb(26, 26, 26)", "hsl(0, 0%, 10%)") or RGB tuples ([26, 26, 26]).When omitted, the engine auto-detects the background by analyzing the perimeter pixels of each image. This works well for logos with transparent backgrounds. For logos on opaque backgrounds (like JPEGs), providing the actual background color produces better results.

React Component Options

These options are only available on the React <LogoSoup> component.

gap

number | string
default:"28"
Space between logos. Accepts a pixel number or a CSS string value.

alignBy

AlignmentMode
default:"visual-center-y"
How to align logos within the row. See Alignment Modes below.

renderImage

(props: ImageRenderProps) => ReactNode
Custom image renderer. Receives all standard <img> attributes (src, alt, width, height, style). Use this to integrate with Next.js Image, add lazy loading, or fully control the <img> output.

className

string
CSS class name applied to the container <div>.

style

CSSProperties
Inline styles applied to the container <div>. Merged with the default container styles (text-align: center, text-wrap: balance).

onNormalized

(logos: NormalizedLogo[]) => void
Callback fired when normalization completes. Receives the array of normalized logos. Useful for analytics, debugging, or syncing state with external systems.

Alignment Modes

Used with the alignBy prop (React component) or getVisualCenterTransform helper (all frameworks).

Using with the hook/composable

When building custom layouts (not using the React <LogoSoup> component), apply alignment with getVisualCenterTransform:

NormalizedLogo Object

Each processed logo is a NormalizedLogo with these properties: