Skip to main content

getIconComponent

getIconComponent(name) — resolve an icon name to a Vue component for <component :is>. Returns null when name is a URL (the caller must render <img>). For registry names, tolerates null/undefined/empty/unknown — all resolve to DEFAULT_ICON's component; never throws on non-URL input.

import { getIconComponent } from '@conduction/nextcloud-vue'
const comp = getIconComponent(dashboard.icon) // null for URLs

Backs CnDashboardIcon. See also isCustomIconUrl, DASHBOARD_ICONS.