Use case prompt
Choose how to resolve the name
- You only show the logo. Build a name lookup URL from the encoded name. Your app stores nothing.
- You must know which company a name means. Send the name to Search from your server, once per name. Save the domain of the best candidate, and render the logo with a domain lookup.
- A person enters the name. Let them pick from suggestions with the company autocomplete.
api/resolve-company.ts
Handle every name state
With Search, save the result with the record, and render from it:
A wrong match still returns a real logo, so a status check cannot catch it. Let users correct the company.
Render the list
This component shows an initials avatar when no company matches the name. Withoutfallback=404, the URL returns a generated monogram instead:
Test the list
Test with a multi-word name such as “The Home Depot”, a name with& such as “AT&T”, and a spelling that misses, such as “Sweet Green”. Check that the miss shows the initials avatar. Make a search fail, and check that the name stays on screen. Then check that a corrected row keeps its correction.
Logo.dev CDN by name
Encoding rules, parameters, and matching for name URLs.
Company autocomplete
Let people pick the right company while they type.