Skip to main content
cngx-src documentation

CngxTagGroupAccessory

Directivev0.1.0

projects/common/display/tag-group/slots/tag-group-accessory.directive.ts

Import#

import { CngxTagGroupAccessory } from '@cngx/common/display'

Description#

Override template for the accessory zone of <cngx-tag-group> - projected BELOW the row of tags. Use for clear-all buttons, sort toggles that span the group, secondary actions, or any trailing decoration the consumer wants to bundle with the layout.

The slot has no default body - when not projected, no DOM is rendered below the tag row. The reactive count of projected <span cngxTag> siblings is exposed via the slot context so consumer "Clear all (5)" patterns work without injection.

<cngx-tag-group [semanticList]="true" label="Active filters">
  <span cngxTag>Frontend</span>
  <span cngxTag>Backend</span>
  <ng-template cngxTagGroupAccessory let-count="count">
    <button (click)="clearAll()">Clear all ({{ count }})</button>
  </ng-template>
</cngx-tag-group>

https://cngxjs.github.io/cngx/examples/#/common/display/tag/app-wide-defaults-via-providetagconfig https://cngxjs.github.io/cngx/examples/#/common/display/tag/color-palette https://cngxjs.github.io/cngx/examples/#/common/display/tag/composition-with-cngxicon https://cngxjs.github.io/cngx/examples/#/common/display/tag/density https://cngxjs.github.io/cngx/examples/#/common/display/tag/group-semantic-list https://cngxjs.github.io/cngx/examples/#/common/display/tag/group-with-header-accessory https://cngxjs.github.io/cngx/examples/#/common/display/tag/layout-only-alignment https://cngxjs.github.io/cngx/examples/#/common/display/tag/layout-only-gap-variants https://cngxjs.github.io/cngx/examples/#/common/display/tag/link-mode https://cngxjs.github.io/cngx/examples/#/common/display/tag/slot-overrides-custom-label https://cngxjs.github.io/cngx/examples/#/common/display/tag/slot-overrides-prefix-label-suffix https://cngxjs.github.io/cngx/examples/#/common/display/tag/truncate-maxwidth https://cngxjs.github.io/cngx/examples/#/common/display/tag/variant-matrix

Metadata#

Index#

Properties

Instance Properties#

templateRef#unknown
Readonly
inject<TemplateRef<CngxTagGroupAccessoryContext>>(TemplateRef)