Skip to main content

Query logos by type

index.js
const icon = brand.logos.find(({ type }) => type === 'icon')
const logos = brand.logos.filter(({ type }) => type === 'logo')
const symbols = brand.logos.filter(({ type }) => type === 'symbols')

Query logos by theme

index.js
const logoDark = brand.logos.find(({ type, theme }) => type === 'logo' && theme === 'dark')
const logoLink = brand.logos.find(({ type, theme }) => type === 'logo' && theme === 'light')

Query a specific format

index.js
const file = logo.formats.find(({ format }) => format === 'svg')

Retrieve the best available format

index.js
const priorityList = ['svg', 'webp', 'png', 'jpeg', 'jpg']

const file = priorityList.find(priorityFormat =>
  logo.formats.some(({ format }) => format === priorityFormat)
)

API Reference

For more details, refer to our API Reference.