vnlogos
Star on GitHub86

Docs

219 logos of 39 Vietnamese banks and 180 merchant brands, plus 36 Vietnamese dishes, four ways to use them. Pick whichever fits.

Getting started

The quickest way: add a logo to your React project as a component.

Terminal
npx vnlogos add vcb highlands

That writes components/logos/vcb.tsx and components/logos/highlands.tsx. Each file holds the logo as a data URI, so there is nothing else to copy or configure.

page.tsx
import { VcbLogo } from "@/components/logos/vcb";
import { HighlandsLogo } from "@/components/logos/highlands";

<VcbLogo height={24} />
<HighlandsLogo size={40} />

Not on React? Install the npm package for the files and data, or link a file from the CDN. Every logo also has its own page; find one with ⌘ K.

The npx CLI

No install needed. Every command works with npx, pnpm dlx, yarn dlx and bunx.

CommandWhat it does
vnlogos add <id...>Writes one React component per logo or line icon into your project. --lines picks the icon when an id is also a dish.
vnlogos list [query]Lists ids and names; the query also matches provinces. --banks, --brands, --dishes or --lines narrows it.
vnlogos info <id>Colours, MCCs, statement spellings, provinces and file paths.
vnlogos copy <dir>Copies every PNG and SVG into a folder, such as public/logos.

Options for add

OptionDefault
--dir <path>src/components/logos when there is a src folder, else components/logos
--jsWrites .jsx. Without a tsconfig.json this is already the default.
--overwriteReplaces a file that already exists; otherwise it is kept.
Terminal
npx vnlogos list coffee
npx vnlogos info phuc-long
npx vnlogos list --lines "ha noi"
npx vnlogos copy public/logos --banks
Ids are lower case without accents: phuc-long, bach-hoa-xanh. Banks use their short code: vcb, tcb, mbb.

Components

Brand components draw a square tile; bank components draw the wordmark at a fixed height.

PropApplies toDefaultMeaning
sizeBrands40Tile side in px.
radiusBrands24% of sizeCorner radius in px.
heightBanks24Height in px; width follows the logo.
variantBanks"color""mono" draws the logo in one colour through a CSS mask.
tintBankscurrentColorThe colour for variant="mono".

Every other prop goes to the <img>: className, alt, loading and so on. Bank logos in colour are made for light backgrounds. On a dark one, use variant="mono" with a light tint, or put the logo on a white plate.

Install the package

npm install vnlogos

Node 18 or later. No dependencies; React is only needed for vnlogos/react. ESM, CommonJS and TypeScript types are included.

Data

data.ts
import { brands, banks, getBrand, getBank } from "vnlogos";

getBrand("gs25");
// { id: "gs25", name: "GS25", mark: "GS25",
//   background: "#0A8FD1", foreground: "#FFFFFF",
//   aliases: ["gs 25"], category: "Convenience", mccs: ["5499"],
//   logo: { file: "brands/gs25.png", format: "png", width: 512, height: 512 } }

getBank("vcb").logos.color.file; // "banks/vcb.png"
FieldMeaning
markOne to four characters to draw when there is no image.
background
foreground
Tile and mark colours, #RRGGBB. The background matches the edge of the logo.
aliasesOther ways the name is printed on receipts and statements.
category
mccs
The kind of merchant and the merchant category codes it usually charges under.
color
accent
A bank's two logo colours.
logos.colorThe bank's logo file as published.
logos.mono
oneColour
To draw a bank logo in one colour, use logos.mono ?? logos.color as a mask. mono exists only where the colour file has a detail a fill would cover. oneColour is false when the file sits on a solid box.
cardsUrlThe bank's credit card page.

Statement matching

matchBrand() finds the brand in the merchant name a bank prints. Accents and case don't matter.

match.ts
import { matchBrand } from "vnlogos";

matchBrand("POS GS25 HCM")?.id;        // "gs25"
matchBrand("MINISTOP Q.3")?.id;        // "ministop"
matchBrand("Bách hoá xanh Q7")?.name;  // "Bách Hoá Xanh"
matchBrand("Corner shop");             // undefined

Files and data URIs

Every logo is a file in the package. Vite, Next.js and webpack turn an import into a URL.

files.ts
import gs25 from "vnlogos/brands/gs25.png";
import vcb from "vnlogos/banks/vcb.png";
import hsbcMask from "vnlogos/banks/hsbc-mono.svg";

For email, canvas or PDF work, import a data: URI instead. Each logo is its own module, so a bundler keeps only what you import.

inline.ts
import { brandGs25, bankVcb, bankHsbcMono } from "vnlogos/inline";
import tcb from "vnlogos/inline/banks/tcb";
Don't import * from vnlogos/inline: that pulls in all 298 logo files, about 5.5 MB.

React helpers

If you'd rather not copy components, the package has two that load files from a folder. Copy the files once, then point the provider at it.

Terminal
npx vnlogos copy public/logos
app.tsx
import { BrandTile, BankLogo, LogoProvider } from "vnlogos/react";

<LogoProvider baseUrl="/logos">
  <BrandTile brand="highlands" size={44} />
  <BankLogo bank="vcb" height={24} />
  <BankLogo bank="hsbc" variant="mono" />
</LogoProvider>

BrandTile falls back to the brand's mark on its colour when the image is missing; BankLogo falls back to the bank's name. Both take src to use an imported URL or data URI.

Dishes

36 dishes from the three regions, drawn for vnlogos. Each has an icon (dishes/<id>.svg, the dish on a clear ground) and a seal (dishes/<id>-seal.svg, a round stamp with its name and hometown). Both are SVG, 200 × 200.

Terminal
npx vnlogos add pho-bo bun-bo-hue com-tam
dish.tsx
import { getDish, logoUrl } from "vnlogos";
import { DishLogo } from "vnlogos/react";

getDish("bun-bo-hue").english;              // "Spicy lemongrass beef noodle soup"
logoUrl(getDish("com-tam"), "/logos", "seal"); // "/logos/dishes/com-tam-seal.svg"

<DishLogo dish="pho-bo" size={48} tile />
<DishLogo dish="bun-bo-hue" variant="seal" size={96} />
FieldMeaning
name
english
Vietnamese name with accents, and a short English gloss.
region
place
bac, trung or nam, and the town the dish is famous from.
descriptionOne sentence in Vietnamese on what goes into it.
background
color
The region's tile colour and seal colour.
logos.icon
logos.seal
The two SVG files.

The drawings are original artwork made for vnlogos and are MIT licensed with the code.

shadcn registry

Every logo is also a registry item, so the shadcn CLI can add the same component:

Terminal
npx shadcn@latest add https://vnlogos.com/r/vcb.json

Swap vcb for any id. The file is the one npx vnlogos add writes.

CDN and JSON

No build step? Link a file from jsDelivr, pinned to a version:

index.html
<img src="https://cdn.jsdelivr.net/npm/vnlogos@0.1.1/logos/brands/gs25.png" width="44" alt="GS25">
<img src="https://cdn.jsdelivr.net/npm/vnlogos@0.1.1/logos/banks/vcb.png" height="24" alt="Vietcombank">

All the data as one JSON file: https://cdn.jsdelivr.net/npm/vnlogos@0.1.1/dist/meta.json.

Contributing

Missing a bank or brand? Suggest it, or send a pull request:

Details in the contributing guide.

Trademarks

Every bank and brand logo is a trademark of its owner. vnlogos is not affiliated with or endorsed by any bank or brand in it, and the MIT license covers only the code, the data and the dish drawings. Use a logo to identify the bank or merchant, for example next to a card or a transaction, not to suggest a partnership.

Own a brand and want its logo changed or removed? Open a removal request. More in the legal notice and the MIT license.