Use case prompt
Store the bare domain
Store the domain, such asgithub.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=darkso 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=404and show your avatar.
Render the component
This component shows an initials avatar when a domain has no logo:Test the component
Rendergithub.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.