Skip to main content
Use case prompt
CRM rows, vendor dashboards, and customer directories are easier to scan when each company has its logo. Your app stores the domain, picks the theme for each surface, and decides what a company with no logo shows.

Store the bare domain

Store the domain, such as github.com, with no protocol or path. Put it in a Logo.dev CDN URL with your publishable key. The component below sets the image parameters.

Choose the theme and the fallback

  • Theme. Follow the user’s color scheme by default. On a surface that is always dark, such as a sidebar, force theme=dark so that dark marks like GitHub’s stay visible.
  • No logo. Keep the generated monogram when a lettermark is enough. When your design has its own placeholder, add fallback=404 and show your avatar.

Render the component

This component shows an initials avatar when a domain has no logo:
If your data has company names but no domains, use a name lookup.

Test the component

Render github.com on a light and a dark surface, and check that the mark stays visible on both. Then render made-up-startup.io, and check that the initials avatar appears at the same size. Change the domain back, and check that the logo returns.

Logo.dev CDN by domain

Every parameter the domain URL accepts.

Logo from a name

Render logos from company names when your lists have no domains.