Skip to content

App Icon

Last updated 30 Nov 2026

NbAppIcon shows an app: its icon when there is one, its initials in a tile when there is not.

Next to a visible name, make it decorative ​

By default the tile is announced as an image named after the app. When the name is already written beside it, as in a table's name column, set decorative so it is not read twice.

vue
<template>
  <span class="app-name">
    <NbAppIcon :name="app.name" :src="app.logoUrl" size="sm" decorative />
    {{ app.name }}
  </span>
</template>

Only pass addresses you trust ​

src goes straight into an <img>. When the address comes from people (an app registry where admins type a logo URL), check it is http: or https: before passing it, and pass null otherwise. The tile then shows initials.

Sizes ​

size takes a step of the scale, xs (20), sm (24), md (28) or lg (40), the same steps as NbAvatar, or a number of pixels for a size the scale does not carry. The initials scale with the tile.

vue
<template>
  <NbAppIcon :name="app.name" :size="18" />
  <NbAppIcon :name="app.name" :size="56" />
</template>

Props ​

PropTypeDefaultDescription
namestring | nullThe app's name. Gives the initials and the accessible name.
srcstring | nullIcon URL. Absent, empty or failing to load shows initials.
size'xs' | 'sm' | 'md' | 'lg' | number'md'20, 24, 28 or 40 pixels, or any number of pixels.
backgroundstringunsetBackground behind the initials. Any CSS colour, including a token.
colorstringunsetColour of the initials, for a background the default will not read on.
decorativebooleanfalseHide from assistive technology, for when the name is already visible.