Icon Item
import { KbqIconModule } from '@koobiq/components/icon';
Methods
addSvgIcon
Registers an SVG icon by URL in the default namespace.
addSvgIconInNamespace
Registers an SVG icon by URL under the given namespace.
addSvgIconLiteral
Registers an SVG icon from an inline HTML string in the default namespace.
addSvgIconLiteralInNamespace
Registers an SVG icon from an inline HTML string under the given namespace.
addSvgIconSet
Registers an SVG sprite file in the default namespace. Icons are looked up by their `symbol id`.
addSvgIconSetInNamespace
Registers an SVG sprite file under the given namespace. Duplicate URLs are silently ignored.
getNamedSvgIcon
Emits a cloned SVGElement for the given name. Accepts "namespace:name" syntax.

Selector: [kbq-icon-item]

Properties
Name Description
@Input()
big: boolean
@Input()
fade: boolean
@Input('kbq-icon-item')
iconName: string
Name of an icon within a
autoColor: boolean
changeDetectorRef: ChangeDetectorRef
color: string
colorClassName: string current class name of color
destroyRef: DestroyRef
elementRef: ElementRef
formField: KbqFormFieldRef
hasError: boolean
name: string
registry: KbqIconRegistry
small: boolean
Methods
getHostElement
setDefaultColor
this color will be used as a default value. For example [color]="'' | false | undefined | null".
updateMaxHeight

Selector: [kbq-icon-button]

Properties
Name Description
@Input()
disabled: boolean
Whether the button is disabled.
@Input('kbq-icon-button')
iconName: string
Name of an icon within a
@Input()
small: boolean
@Input()
tabindex: any
autoColor: boolean
changeDetectorRef: ChangeDetectorRef
color: string
colorClassName: string current class name of color
destroyRef: DestroyRef
elementRef: ElementRef
focusMonitor: FocusMonitor
formField: KbqFormFieldRef
hasError: boolean
name: string
registry: KbqIconRegistry
Methods
getHostElement
setDefaultColor
this color will be used as a default value. For example [color]="'' | false | undefined | null".
updateMaxHeight

Selector: [kbq-icon]

Properties
Name Description
@Input()
autoColor: boolean
@Input('kbq-icon')
iconName: string
Name of an icon within a
@Input()
small: boolean
changeDetectorRef: ChangeDetectorRef
color: string
colorClassName: string current class name of color
destroyRef: DestroyRef
elementRef: ElementRef
formField: KbqFormFieldRef
hasError: boolean
name: string
registry: KbqIconRegistry
Methods
getHostElement
setDefaultColor
this color will be used as a default value. For example [color]="'' | false | undefined | null".
updateMaxHeight
Properties
Name Description
namespace: string Optional namespace to register the sprite under.
spriteUrl: string URL to the SVG sprite file. Must be served as a static asset.
Properties
Name Description
viewBox: string
withCredentials: boolean

Configures the icon registry to load icons from one or more SVG sprite assets.

const kbqIconsProvider(...sprites: KbqIconsConfig[]): Provider;
Parameters Description
sprites: KbqIconsConfig[]

Registers a resolver function that maps icon names to SVG strings or URLs. Multiple resolvers can be registered; they are tried in registration order.

const kbqIconsResolverProvider(resolver: KbqIconResolver): Provider;
Parameters Description
resolver: KbqIconResolver

Registers a name→SVG/URL dictionary as an icon resolver. Values starting with `<` are treated as inline SVG (no HTTP request). All other values are treated as URLs and fetched at runtime.

const kbqIconsDictProvider(dict: Record<string, string>): Provider;
Parameters Description
dict: Record

A function that resolves an icon name to either an inline SVG string or a URL string. Return `null` to indicate this resolver does not handle the given name.

type KbqIconResolver = (name: string) => string | null;
const KBQ_ICONS_CONFIG: InjectionToken<KbqIconsConfig[]>;

Multi-valued injection token for icon resolver functions. Resolvers are tried in registration order; the first non-null result wins.

const KBQ_ICON_RESOLVER: InjectionToken<KbqIconResolver[]>;
Docs Feedback
If you have any questions or would like to contribute to writing the documentation, please create an issue in our GitHub repository.