Skip to main content
cngx-src documentation

CngxAccordionHost

Interface

projects/common/interactive/accordion/accordion.token.ts

Referenced by#

Import#

import { CngxAccordionHost } from '@cngx/common/interactive'

Description#

Contract a CngxAccordion provides so each CngxAccordionPanel can read the open/closed arbitration and self-wire keyboard navigation without injecting the concrete parent class (which would create a cyclic type and block Atomic Decompose). The coordinator owns the single open-set signal plus the header registry; panels call toggle, register their header handle, and bind tabindex/keydown through nav.

Index#

Instance Properties#

headers#Signal
Readonly

Every registered header handle (the coordinator's roving registry).

multi#Signal
Readonly

Whether more than one panel may stay open at once.

rovingActiveId#Signal
Readonly

Id of the header that is the group's single tab stop, or null.

Methods#

isOpen#boolean
isOpen(panelId: string)

Whether the panel with this id is currently open (reads the open-set signal).

@parampanelIdstring
registerHeader#void
registerHeader(handle: CngxAccordionHeaderHandle)

Register a header handle on init (view-boundary-immune, unlike contentChildren).

setRovingActive#void
setRovingActive(id: string)

Record the header the roving tab stop should move to.

@paramidstring
toggle#void
toggle(panelId: string)

Toggle the panel; in single mode this closes every sibling first.

@parampanelIdstring
unregisterHeader#void
unregisterHeader(handle: CngxAccordionHeaderHandle)

Deregister a header handle on destroy.