Skip to content
vnlogos

Docs

224 logos of 40 Vietnamese banks and 184 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.

$ 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} />

On Vue or Svelte? The same command writes .vue or .svelte files, and the package has components for both. On iOS or Android, use the Swift package or Android library. For anything else, 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, Vue or Svelte component per logo or line icon into your project, matching what your package.json uses. --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
--react, --vue, --svelteThe framework your package.json depends on, else React
--dir <path>src/components/logos when there is a src folder, else components/logos; src/lib/components/logos in SvelteKit
--jsWrites JavaScript (.jsx, or a .vue or .svelte file without lang="ts"). Without a tsconfig.json this is already the default.
--overwriteReplaces a file that already exists; otherwise it is kept.
$ 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, Vue or Svelte is only needed for vnlogos/react, vnlogos/vue or vnlogos/svelte. 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
  • A name or alias must appear as whole words, so “Bé Mart” does not match Be.
  • When several brands match, the earliest one in the text wins, then the longest.
  • One- and two-letter aliases only match the whole text.
  • A brand's notWith words rule it out: "AMAZON PRIME" is not Prime.

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 303 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.

$ 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.

Vue and Svelte

The same components ship for Vue 3 and Svelte 5, with the same props. They load files from a folder like the React ones.

main.ts
import { vnlogos } from "vnlogos/vue";
app.use(vnlogos, { baseUrl: "/logos" });
App.vue
import { BrandTile, BankLogo, DishLogo, LineIcon } from "vnlogos/vue";

<BrandTile brand="highlands" :size="44" />
<BankLogo bank="hsbc" variant="mono" color="#fff" />
<DishLogo dish="pho-bo" tile />
<LineIcon icon="khue-van-cac" :size="32" />
+page.svelte
<script>
  import { BrandTile, BankLogo, DishLogo, LineIcon, setLogoBaseUrl } from "vnlogos/svelte";
  setLogoBaseUrl("/logos"); // once, e.g. in +layout.svelte
</script>

<BrandTile brand="highlands" size={44} />
<BankLogo bank="hsbc" variant="mono" color="#fff" />
<DishLogo dish="pho-bo" tile />
<LineIcon icon="khue-van-cac" size={32} />

Vue also has <LogoProvider base-url="/logos">, and Svelte <LogoProvider baseUrl="/logos">, for one part of a page. The Svelte components ship as .svelte files that your app compiles, as Svelte libraries do. To embed the logo in a file of your own instead, run npx vnlogos add: in a Vue or Svelte project it writes VcbLogo.vue or VcbLogo.svelte.

Swift and Android

The same logos for SwiftUI (iOS 15, macOS 12, tvOS, watchOS, visionOS) and Jetpack Compose (Android 5.0, minSdk 21). Logos and dishes come as PNG; line icons are vector paths, so they take any colour and stroke width.

In Xcode, choose File › Add Package Dependencies… and paste https://github.com/RinNguyens/vnlogos.

ContentView.swift
import VNLogos

BrandTile("gs25")
BankLogo("hsbc", variant: .mono, tint: .white)
DishLogo("pho-bo", size: 48, tile: true)
LineIcon("khue-van-cac", size: 32, color: .orange)

VNLogos.matchBrand("POS GS25 HCM")?.id   // "gs25"

On Android, add the library from JitPack:

Gradle
// settings.gradle.kts
dependencyResolutionManagement {
  repositories { maven("https://jitpack.io") }
}

// build.gradle.kts
implementation("com.github.RinNguyens:vnlogos:v0.4.0")
Screen.kt
import com.vnlogos.*

BrandTile("gs25")
BankLogo("hsbc", variant = BankLogoVariant.Mono, tint = Color.White)
DishLogo("pho-bo", tile = true)
LineIcon("khue-van-cac", size = 32.dp, color = Color(0xFFA8541F))

VNLogos.catalog(context).matchBrand("POS GS25 HCM")?.id   // "gs25"

Line icons follow the foreground colour (SwiftUI) or LocalContentColor (Compose) unless you pass a colour. BankLogo in mono draws the wordmark in one colour; banks without a file show their name.

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.

$ 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:

$ 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.4.0/logos/brands/gs25.png" width="44" alt="GS25">
<img src="https://cdn.jsdelivr.net/npm/vnlogos@0.4.0/logos/banks/vcb.png" height="24" alt="Vietcombank">

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

Contributing

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

  • Brands: logos/brands/<id>.png, square, at least 512 px.
  • Banks: logos/banks/<id>.svg (preferred) or a PNG at most 240 px high; a mask for one-colour drawing is <id>-mono.
  • Add the entry to data/brands.json or data/banks.json and run npm test.
  • Official sources only: the brand's site or press kit, its App Store or Google Play icon, or Wikimedia Commons.

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.

Search logos

Search every logo and icon