Overview
Selector
[qzToggleGroup]
| Input |
Type |
Default |
Required |
Description |
type |
ToggleGroupType |
DEFAULT_TOGGLE_GROUP_CONFIG.type |
|
|
disabled |
unknown |
false |
|
Transform booleanAttribute; reads as boolean. |
orientation |
ToggleGroupOrientation |
DEFAULT_TOGGLE_GROUP_CONFIG.orientation |
|
|
loop |
unknown |
DEFAULT_TOGGLE_GROUP_CONFIG.loop |
|
Transform booleanAttribute; reads as boolean. |
allowDeselection |
unknown |
DEFAULT_TOGGLE_GROUP_CONFIG.allowDeselection |
|
Single mode only: whether pressing the pressed item clears the value (null). Default true (the pre-0.11 behaviour); false makes single mode behave like "one of" with no empty state. Transform booleanAttribute; reads as boolean. |
compareWith |
(a: T, b: T) => boolean |
|
|
|
Models
Two-way bindings: each model is an input and emits the matching change output.
| Model |
Type |
Default |
Required |
Change output |
Description |
value |
T | readonly T[] | null |
null |
|
valueChange |
|
Outputs
| Output |
Payload |
Description |
valueChangeCommitted |
T | readonly T[] | null |
Emits the new value once per user activation: a T | null in single mode, a T[] in multiple mode. Programmatic value writes and focus/roving navigation never emit. |
Properties
| Name |
Type |
Description |
readonly isDisabled |
Signal<boolean> |
Effective disabled state: the disabled input OR a disabled Angular Forms control. |
readonly activeId |
Signal<string> |
|
readonly activeItem |
Signal<ToggleItemDirective<T> & CollectionItem> |
|
Public methods
register
register(item: ToggleItemDirective<T>): void
| Parameter |
Type |
Optional |
Description |
item |
ToggleItemDirective<T> |
|
|
unregister
unregister(item: ToggleItemDirective<T>): void
| Parameter |
Type |
Optional |
Description |
item |
ToggleItemDirective<T> |
|
|
toggle
toggle(item: ToggleItemDirective<T>, options?: { focus?: boolean; }): void
| Parameter |
Type |
Optional |
Description |
item |
ToggleItemDirective<T> |
|
|
options |
{ focus?: boolean } |
Yes |
|
setFormDisabled(disabled: boolean): void
Adapter hook for @quartz-headless/primitives/forms (setDisabledState).
| Parameter |
Type |
Optional |
Description |
disabled |
boolean |
|
|
setActive
setActive(item: ToggleItemDirective<T>, options?: { focus?: boolean; }): void
| Parameter |
Type |
Optional |
Description |
item |
ToggleItemDirective<T> |
|
|
options |
{ focus?: boolean } |
Yes |
|
activeTabIndex
activeTabIndex(id: string): 0 | -1
| Parameter |
Type |
Optional |
Description |
id |
string |
|
|
isPressed
isPressed(item: ToggleItemDirective<T>): boolean
| Parameter |
Type |
Optional |
Description |
item |
ToggleItemDirective<T> |
|
|
onKeydown
onKeydown(event: KeyboardEvent): void
| Parameter |
Type |
Optional |
Description |
event |
KeyboardEvent |
|
|