CngxTagConfig
projects/common/display/tag/config/tag.config.ts
Import#
import { CngxTagConfig } from '@cngx/common/display'
Description#
App-wide cascade for CngxTag + CngxTagGroup defaults, colour
palette, slot templates, and ARIA-string fallbacks.
Resolution priority (high → low):
- Per-instance Input binding (e.g.
[variant]="'subtle'"). provideTagConfigAt(...)in a parent component'sviewProviders(component-scoped override).provideTagConfig(...)at the application root.- Library defaults (English; merged in via
CNGX_TAG_DEFAULTS).
Every key is optional - partial overrides are deep-merged with the library defaults so consumers only declare the keys they want to override.
Index#
Properties
Instance Properties#
Readonly>> Consumer-defined colour map. A registered key is emitted by the
directive as element-level --cngx-tag-bg/-color/-border values
whenever color resolves to it. Predefined keys (neutral/
success/warning/error/info) ship in tag.css and are not
part of this map - entries under a predefined key are a no-op.
literal typeDefault values for CngxTag inputs when no per-instance binding wins.
literal typeDefault values for CngxTagGroup inputs when no per-instance binding wins.
literal typeApp-wide template overrides for the five Tag-family slots.
Resolved in tier 2 of the slot cascade (instance directive wins;
config templates are the middle tier; the host's <ng-template>
default body is the floor).