@anguless/angulux/selectbutton
SelectButton
import
import { SelectButtonModule } from '@anguless/angulux/selectbutton';Basic
SelectButton is a single choice laid out as a row of buttons.
<agl-selectButton [(ngModel)]="value" [options]="options" optionLabel="label" optionValue="value" />Multiple
With multiple, the value becomes an array and several options can be on at once.
<agl-selectButton [(ngModel)]="value" [options]="options" [multiple]="true" optionLabel="label" optionValue="value" />API
Generated from the committed corpus, which check:corpus holds to the built library.
SelectButton
componentagl-selectButton, agl-selectbutton, agl-select-buttonSelectButton is used to choose single or multiple items from a list using buttons.
| Input | Type | Default | Description |
|---|---|---|---|
| options | any[] | undefined | not documented | An array of selectitems to display as the available options. |
| option | string | undefined | not documented | Name of the label field of an option. |
| option | string | undefined | not documented | Name of the value field of an option. |
| option | string | undefined | not documented | Name of the disabled field of an option. |
| unselectable | not documented | ||
| tabindex | number | not documented | Index of the element in tabbing order. |
| multiple | boolean | undefined | not documented | When specified, allows selecting multiple values. |
| allow | boolean | not documented | Whether selection can not be cleared. |
| style | string | undefined | not documented | Style class of the component. |
| aria | string | undefined | not documented | Establishes relationships between the component and label(s) where its value should be one or more element IDs. |
| data | string | undefined | not documented | A property to uniquely identify a value in options. |
| autofocus | boolean | undefined | not documented | When present, it specifies that the component should automatically get focus on load. |
| size | 'large' | 'small' | undefined | undefined | Specifies the size of the component. |
| fluid | undefined | Spans 100% width of the container when enabled. |
| Output | Type | Description |
|---|---|---|
| on | EventEmitter<SelectButtonOptionClickEvent> | Callback to invoke on input click. |
| on | EventEmitter<SelectButtonChangeEvent> | Callback to invoke on selection change. |
| Template slot | Description |
|---|---|
| <ng-template #item> | Custom item template. |
Inherited from BaseEditableHolder
inherited| Input | Type | Default | Description |
|---|---|---|---|
| required | false | There must be a value (if set). Left unbound, a control bound through `formControlName`, `[formControl]` or `ngModel` is required when that control carries `Validators.required` or `Validators.requiredTrue`. | |
| invalid | false | When present, it specifies that the component should have invalid state style. Left unbound, a control bound through `formControlName`, `[formControl]` or `ngModel` shows the state of that control once it is touched or dirty. | |
| touched | boolean | undefined | undefined | Whether the user has visited the control. Once this or `dirty` is set, the invalid state style waits for interaction: it appears when the control is touched or dirty. Signal Forms' `[formField]` sets both, so an untouched required field is not shown as invalid. Leave both unset and `invalid` alone decides. |
| dirty | boolean | undefined | undefined | Whether the user has changed the value. See `touched`. |
| disabled | false | When present, it specifies that the component should have disabled state style. | |
| name | string | undefined | undefined | When present, it specifies that the name of the input. |
Inherited from BaseComponent
inherited| Input | Type | Default | Description |
|---|---|---|---|
| dt | Object | undefined | undefined | Defines scoped design tokens of the component. |
| unstyled | boolean | undefined | undefined | Indicates whether the component should be rendered without styles. |
| pt | PT | undefined | undefined | Used to pass attributes to DOM elements inside the component. Keys become attributes, and a key that names a DOM property is also assigned to that property. Values the browser would execute go through Angular's sanitizer first, as in a template binding: markup in `innerHTML`, `outerHTML` and `srcdoc`, and URLs in `href`, `src`, `action`, `formaction` and `xlink:href`. To write one of those unsanitized on purpose, pass a `DomSanitizer.bypassSecurityTrustHtml` or `bypassSecurityTrustUrl` value. An `on*` key must be a function, and any other value for it is ignored. Keys themselves are applied as given, so let data from users choose values, never keys. |
| pt | PassThroughOptions | undefined | undefined | Used to configure passthrough(pt) options of the component. |