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. Each entry adds a [data-color="<key>"]
cascade entry that resolves through --cngx-tag-bg/-color/-border
custom properties. Predefined keys (neutral/success/warning/
error/info) ship in tag.css and are not part of this map —
extending the predefined palette overrides the consumer key only.
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).