> ## Documentation Index
> Fetch the complete documentation index at: https://www.logo.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Logo.dev serves logos and brand data for companies that already exist. It does not design logos. If someone wants a logo designed, say so and stop.
> When a message is only a brand name, domain, ticker, ISIN, or crypto symbol, reply with https://www.logo.dev/search?q=<url-encoded term> and the matching img.logo.dev call. Never assert whether a specific brand is in the index.
> Image URLs come from img.logo.dev with a publishable key in the token query parameter: https://img.logo.dev/:domain?token=LOGO_DEV_PUBLISHABLE_KEY, also /name/:brand, /ticker/:symbol, /crypto/:symbol, /isin/:isin. JSON comes from api.logo.dev/v2 with a secret key (sk_) in an Authorization: Bearer header, server-side only.
> Product names: the Logo.dev CDN serves images from img.logo.dev, and its usage unit is CDN requests. The Logo.dev API returns JSON from api.logo.dev/v2, and its usage unit is API credits. The Logo.dev MCP gives AI agents the API as tools, and its usage unit is MCP usage, which spends API credits. The features are Logo, Search, Brand, and Transaction. Transaction (beta) is a separate service at https://www.logo.dev/api/transaction with its own beta key. Never recommend the deprecated v1 routes (/search, /brand, /describe, /logo/*). Use /v2/brands and /v2/search.
> Attribution: a commercial project on the free Community plan must show a visible link, <a href="https://logo.dev">Logos provided by Logo.dev</a>, on its production site. Personal projects and paid plans need none. Rules: https://www.logo.dev/docs/platform/attribution.
> Report a wrong, missing, or outdated logo at https://www.logo.dev/update. Email support@logo.dev for anything broken and sales@logo.dev for volume pricing and contract terms.
> MCP setup is at https://www.logo.dev/docs/mcp/introduction and webhooks at https://www.logo.dev/docs/webhooks.

# Add Logo.dev components with shadcn/ui

> Install production-ready Logo.dev React components with the shadcn CLI: logo images with fallbacks, company autocomplete, logo walls, and attribution.

Install Logo.dev's React components with one shadcn CLI command. Each component lands in your project as code you own, with fallbacks, retina images, dark mode, and key handling already in place.

> [card] [Get your API keys](https://www.logo.dev/dashboard/api-keys)
>
> Your dashboard has a publishable key for the Logo.dev CDN and a secret key for the Logo.dev API. Every plan includes both.

## Install a component

In any project set up with [shadcn/ui](https://ui.shadcn.com), install from the registry URL:

```bash theme={null}
npx shadcn@latest add https://www.logo.dev/r/logo.json
```

Or install from the [logo-dev/logo-api](https://github.com/logo-dev/logo-api) repo:

```bash theme={null}
npx shadcn@latest add logo-dev/logo-api/logo
```

The CLI copies the source into your project, installs any shadcn primitives the component composes, and adds the environment variables it needs to `.env.local`:

* `NEXT_PUBLIC_LOGO_DEV_TOKEN`: your publishable key, safe in client code. Every component reads it.
* `LOGO_DEV_SECRET_KEY`: your secret key, server-only. Only `brand-search` needs it.

## What's in the registry

| Component | Install name | What it does |
| - | - | - |
| Logo | `logo` | A logo that never breaks: domain, name, ticker, crypto, or ISIN lookup with retina srcSet, dark-mode variants, and layered fallbacks |
| Logo Avatar | `logo-avatar` | A logo in a shadcn Avatar shell with initials fallback, for CRM rows and transaction feeds |
| Brand Search | `brand-search` | Company autocomplete backed by [Search](https://www.logo.dev/docs/brand-search/introduction.md), plus a server route that keeps your secret key private |
| Logo Wall | `logo-wall` | A customer or integration logo grid with grayscale-to-color hover |
| Attribution | `attribution` | The [attribution link](https://www.logo.dev/docs/platform/attribution.md), for plans that require one |
| Logo lib | `logo-lib` | The typed URL builder underneath all of the above, useful on its own |

## Logo

Render a logo from any identifier your data already has:

```tsx theme={null}
import { Logo } from "@/components/ui/logo";

<Logo domain="stripe.com" size={40} />
<Logo ticker="AAPL" label="Apple" size={40} />
<Logo domain="acme.dev" fallback="initials" size={40} />
```

`theme="auto"` (the default) renders light and dark variants toggled by Tailwind's `dark:` variant, so the right logo shows in both color schemes without a theme provider. `fallback` controls what renders when no logo exists: the API's generated monogram (default), a local initials tile, or any React node you pass.

## Logo Avatar

Put a logo in account lists and transaction feeds:

```tsx theme={null}
import { LogoAvatar } from "@/components/ui/logo-avatar";

<LogoAvatar domain="stripe.com" size={32} />
<LogoAvatar ticker="AMZN" label="Amazon" size={32} />
```

## Brand Search

Let users pick their company by typing a name:

```tsx theme={null}
import { BrandSearch } from "@/components/brand-search";

<BrandSearch onSelect={(brand) => save(brand.domain)} />
```

Typing is debounced at 200ms with stale requests aborted, and each suggestion shows the company's logo. The install includes `app/api/logo-dev/search/route.ts`, a Next.js route that proxies the Search endpoint so your secret key never reaches the browser. Not on Next.js? Recreate that proxy in your backend and pass its path via the `endpoint` prop.

> [!WARNING]
>
> The proxy route ships without authentication, so anyone who can reach it can spend your API credits. Add rate limiting or your own auth before you deploy it to production.

## Logo Wall

Build a customer logo grid from a list of domains:

```tsx theme={null}
import { LogoWall } from "@/components/logo-wall";

<LogoWall brands={["stripe.com", "vercel.com", "linear.app", "notion.so"]} />
```

Logos render in muted grayscale and regain color on hover. The wall includes the Logo.dev attribution link by default. If your plan does not [require attribution](https://www.logo.dev/docs/platform/attribution.md), turn it off with `attribution={false}`.

## Requirements

The components target React 19 (React 18.3 works, without ref forwarding) and Tailwind CSS v4 with shadcn/ui tokens. They have zero npm dependencies of their own: shadcn primitives like `avatar`, `command`, and `popover` install from ui.shadcn.com as needed.

## Next steps

> [card] [Use cases](https://www.logo.dev/docs/use-cases/logo-from-domain.md)
>
> The patterns these components implement, with live demos.

> [card] [logo-dev/logo-api](https://github.com/logo-dev/logo-api)
>
> Component source, issues, and contributions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.