# SiThresholdComponent documentation

**Kind:** component

**Selector:** `si-threshold`

```
import { SiThresholdComponent } from '@siemens/element-ng/threshold';
```

```
component SiThresholdComponent implements OnChanges
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [addAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L170-L170>) | `TranslatableString` | `` $localize`:@@SI_THRESHOLD.ADD:Add step` `` | The aria-label for add button |
| [canAddRemoveSteps](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L122-L122>) | `boolean` | `true` | When disabled, steps cannot be added/removed |
| [deleteAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L161-L161>) | `TranslatableString` | `` $localize`:@@SI_THRESHOLD.DELETE:Remove step` `` | The aria-label for delete button |
| [horizontalLayout](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L128-L128>) | `boolean` | `false` | Use horizontal layout? |
| [inputAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L179-L179>) | `TranslatableString` | `` $localize`:@@SI_THRESHOLD.INPUT_LABEL:Threshold value` `` | The aria-label for input field |
| [maxSteps](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L110-L110>) | `number` | `0` | Max. number of steps, 0 for no hard limit |
| [maxValue](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L98-L98>) | `number` | `100` | The max. value for the threshold value |
| [minValue](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L92-L92>) | `number` | `0` | The min. value for the threshold value |
| [options](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L74-L74>) | `SelectOption<unknown>[]` | `[]` | Options to be shown in select dropdown |
| [readonly](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L140-L140>) | `boolean` | `false` | The obvious |
| [readonlyConditions](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L146-L146>) | `boolean` | `false` | Indicate that the threshold options are readonly and cannot be changed. This will also disable adding / removing steps. |
| [scrollStrategy](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L152-L152>) | `ScrollStrategy` | `defaultConnectedOverlayScrollStrategy()` | CDK scroll strategy used for threshold option select overlays. |
| [showDecIncButtons](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L134-L134>) | `boolean` | `true` | Show dec/inc buttons? |
| [statusAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L188-L188>) | `TranslatableString` | `` $localize`:@@SI_THRESHOLD.STATUS:Status` `` | The aria-label for status selection |
| [stepSize](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L104-L104>) | `number` | `1` | The step size for the threshold value |
| [thresholdSteps](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L80-L80>) | `ThresholdStep[]` | `[]` | The thresholds |
| [unit](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L86-L86>) | `string` | `''` | The unit to show |
| [useAliasForStepValues](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L196-L196>) | `boolean` | `false` | When enabled, numeric step inputs are replaced with readonly text fields displaying the `aliasLabel` of each step. Add/remove step buttons are also hidden. |
| [validation](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L116-L116>) | `boolean` | `true` | Do validation? |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [thresholdStepsChange](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L80-L80>) | `ThresholdStep[]` | The thresholds |
| [validChange](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L199-L199>) | `boolean` | Fired when validation status changes |

#### Attributes and Methods

##### valid

[Source for valid](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L214-L216>)

**Modifiers:** readonly

**Type:** `boolean`

Whether the current input value is valid or not.

### Types Documentation

### [SelectOption](<https://github.com/siemens/element/blob/main/projects/element-ng/select/si-select.types.ts#L21-L51>)

**Kind:** interface

```
import type { SelectOption } from '@siemens/element-ng/select';
```

A select option

```
interface SelectOption<T>
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/select/si-select.types.ts#L32-L32>) (optional) | `boolean` | Whether this option is disabled. |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/select/si-select.types.ts#L34-L34>) (optional) | `string` | An optional icon. |
| [iconColor](<https://github.com/siemens/element/blob/main/projects/element-ng/select/si-select.types.ts#L36-L36>) (optional) | `string` | The color of an icon. |
| [label](<https://github.com/siemens/element/blob/main/projects/element-ng/select/si-select.types.ts#L45-L45>) (optional) | `TranslatableString` | A label to be shown for this option. Is optional if a custom template is provided or if the value should directly be rendered. |
| [stackedIcon](<https://github.com/siemens/element/blob/main/projects/element-ng/select/si-select.types.ts#L38-L38>) (optional) | `string` | An optional stacked icon. |
| [stackedIconColor](<https://github.com/siemens/element/blob/main/projects/element-ng/select/si-select.types.ts#L40-L40>) (optional) | `string` | The color of a stacked icon. |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/select/si-select.types.ts#L23-L23>) | `"option"` | Defines this to be an option. |
| [typeaheadLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/select/si-select.types.ts#L50-L50>) (optional) | `TranslatableString` | Used for typeahead functionality when filtering is disabled. If provided, this will be used, otherwise the innerText of the rendered element. |
| [value](<https://github.com/siemens/element/blob/main/projects/element-ng/select/si-select.types.ts#L30-L30>) | `T` | The value if this option. It will be used for formControls and the value property of this `si-select`. The value will internally be checked on equality by using `===`. So an app should either use `string` or ensure that same values are referentially equal. |

### [ThresholdStep](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L35-L44>)

**Kind:** interface

```
import type { ThresholdStep } from '@siemens/element-ng/threshold';
```

One step in a list of thresholds

```
interface ThresholdStep
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [aliasLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L43-L43>) (optional) | `TranslatableString` | Optional alias label for the threshold step, used when `useAliasForStepValues` is `true` |
| [optionValue](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L39-L39>) | `string` | One of the `SelectOption.id` |
| [valid](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L41-L41>) (optional) | `boolean` | When set to `false`, input fields are highlighted as invalid |
| [value](<https://github.com/siemens/element/blob/main/projects/element-ng/threshold/si-threshold.component.ts#L37-L37>) (optional) | `number` | Threshold value, the first step has no value |

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';
```

Represents a translatable string. This can either be a translation key, e.g. `ACTIONS.EDIT` that will be automatically translated when displayed on the UI or a pre-translated string, e.g. `Edit`. Equivalent to a normal string in usage and functionality.

```
type TranslatableString = string & Translatable
```
