Skip to main content
cngx-src documentation

CngxSelectConfig

Interface

projects/forms/select/shared/config.ts

Referenced by#

Import#

import { CngxSelectConfig } from '@cngx/forms/select'

Description#

Resolved select-family configuration cascade. Built by composing with* features through provideSelectConfig / provideSelectConfigAt; consumed via the CNGX_SELECT_CONFIG injection token. Every field is optional - unset keys fall back to the library defaults.

Index#

Instance Properties#

ReadonlyOptional

Live-region announcer config.

ReadonlyOptional

ARIA-label overrides. Partial. Per-instance input wins.

chipOverflow#"wrap" | "scroll-x" | "truncate"
ReadonlyOptional

Chip-strip overflow for multi-value triggers.

  • 'wrap' (default) - chips wrap, trigger grows.
  • 'scroll-x' - single row, horizontal scroll.
  • 'truncate' - first maxVisibleChips chips + +N badge.
commitErrorAnnouncePolicy#CngxCommitErrorAnnouncePolicy | null
ReadonlyOptional

Forces the scalar-commit error announce policy. null keeps each variant's baseline (CngxSelect verbose/assertive, Typeahead + ActionSelect soft). Array-commit variants don't read this.

ReadonlyOptional

Default surface for commitAction errors: banner, inline, or none.

dismissOn#"outside" | "escape" | "both"
ReadonlyOptional

Dismiss strategy: click outside, Escape, or both.

enterKeyHint#"enter" | "done" | "go" | "next" | "previous" | "search" | "send" | null
ReadonlyOptional

enterkeyhint forced across input-trigger variants. null keeps each variant's baseline (Typeahead 'done', Combobox 'enter', ActionSelect 'go', ActionMultiSelect 'enter').

ReadonlyOptional

Panel-shell async-view fallback labels. Per-instance template wins.

inputMode#"search" | "text" | "email" | "url" | "tel" | "numeric" | "decimal" | "none"
ReadonlyOptional

inputmode for input-trigger variants. Default 'search'. Button-trigger variants don't read this.

ReadonlyOptional

Default first-load indicator variant.

maxVisibleChips#number
ReadonlyOptional

Truncate threshold. Values ≤ 0 coerced to 1. Default 3.

openOn#"click" | "focus" | "click+focus"
ReadonlyOptional

Open strategy: click, focus, or both.

panelClass#string | unknown
ReadonlyOptional

Class(es) applied to the panel root for theming.

panelWidth#"trigger" | number | null
ReadonlyOptional

Panel width strategy:

  • 'trigger' (default): panel min-width matches trigger width via anchor-size(width).
  • number: fixed px min-width.
  • null: natural - panel sizes to content.
popoverPlacement#PopoverPlacement
ReadonlyOptional

Popover placement for every flat variant. Default 'bottom'. Action organisms read CngxActionSelectConfig.popoverPlacement instead.

ReadonlyOptional

Default subsequent-load (refreshing) indicator variant.

restoreFocus#boolean
ReadonlyOptional

Focus-restore to trigger on panel close.

selectionIndicatorPosition#CngxSelectSelectionIndicatorPosition
ReadonlyOptional

Position of the per-option selection indicator relative to the label inside a panel row. Defaults to 'before'.

selectionIndicatorVariant#CngxSelectSelectionIndicatorVariant
ReadonlyOptional

Visual form of the per-option selection indicator. 'auto' picks 'checkbox' for multi-select / combobox and 'checkmark' for single-select. Defaults to 'auto'.

showCaret#boolean
ReadonlyOptional

Whether the default trigger caret (▾) is shown at all.

showSelectionIndicator#boolean
ReadonlyOptional

Whether the default selected-indicator (checkmark) is shown at all.

skeletonRowCount#number
ReadonlyOptional

Number of skeleton rows rendered when loadingVariant === 'skeleton'.

templates#literal type
ReadonlyOptional

Default template overrides applied when no per-instance slot is projected.

typeaheadDebounceInterval#number
ReadonlyOptional

Typeahead buffer reset window in ms.

typeaheadWhileClosed#boolean
ReadonlyOptional

Whether typeahead commits value while panel is closed (native <select> parity).

ReadonlyOptional

Opt-in recycler virtualisation. Custom virtualisation pipelines provide CNGX_PANEL_RENDERER_FACTORY directly - that token wins.