Skip to main content

We have released KoliBri - Public UI v4 (Next). For the LTS version, see .

Your opinion matters! Together with you, we want to continuously improve KoliBri. Share your ideas, wishes, or suggestions—quickly and easily.

InputRange

#InputRange

Synonyms: Slider

The Range input type creates an interactive element that allows values ​​to be changed by moving a slider.

Construction

Code

<kol-input-range
_label="Wertebereich"
_min="100"
_max="200"
_value="100"
_step="20"
_icons='{"left": "codicon codicon-arrow-small-down", "right": "codicon codicon-arrow-small-up"}'
></kol-input-range>

Events

For the handling of events or callbacks, see .

EventtriggerValue
clickInput field is clicked-
focusInput field is focused-
blurInput field loses focus-
inputValue is changed by enteringCurrent value of the input field
changeEntry has been completedCurrent value of the input field

Example

Usage

Best practices

  • Make sure to set id and name correctly so that the data is sent when you submit the form.

Accessibility

Keyboard controls

buttonFunction
TabFocuses the input field.
arrow keysChange the value of the range component.

Properties

PropertyAttributeDescriptionTypeDefault
_accessKey_access-keyDefines the key combination that can be used to trigger or focus the component's interactive element.string | undefinedundefined
_autoComplete_auto-completeDefines whether the input can be auto-completed.string | undefined'off'
_disabled_disabledMakes the element not focusable and ignore all events.boolean | undefinedfalse
_hideLabel_hide-labelHides the caption by default and displays the caption text with a tooltip when the interactive element is focused or the mouse is over it.boolean | undefinedfalse
_hideMsg_hide-msgHides the error message but leaves it in the DOM for the input's aria-describedby.boolean | undefinedfalse
_hint_hintDefines the hint text.string | undefined''
_icons_iconsDefines the icon classnames (e.g. _icons="fa-solid fa-user").string | undefined | { right?: IconOrIconClass | undefined; left?: IconOrIconClass | undefined; }undefined
_id_id[DEPRECATED] Will be removed in the next major version.

Defines the internal ID of the primary component element.
string | undefinedundefined
_label (required)_labelDefines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to false to enable the expert slot.stringundefined
_max_maxDefines the maximum value of the element.`${number}.${number}` | `${number}` | number | undefined100
_min_minDefines the smallest possible input value.`${number}.${number}` | `${number}` | number | undefined0
_msg_msgDefines the properties for a message rendered as Alert component.Omit<AlertProps, "_on" | "_hasCloser" | "_label" | "_level" | "_variant"> & { _description: string; } | string | undefinedundefined
_name_nameDefines the technical name of an input field.string | undefinedundefined
_on--Gibt die EventCallback-Funktionen für das Input-Event an.InputTypeOnBlur & InputTypeOnClick & InputTypeOnChange & InputTypeOnFocus & InputTypeOnInput & InputTypeOnKeyDown | undefinedundefined
_shortKey_short-keyAdds a visual shortcut hint after the label and instructs the screen reader to read the shortcut aloud.string | undefinedundefined
_step_stepDefines the step size for value changes.`${number}.${number}` | `${number}` | number | undefinedundefined
_suggestions_suggestionsSuggestions to provide for the input.W3CInputValue[] | string | undefinedundefined
_tooltipAlign_tooltip-alignDefines where to show the Tooltip preferably: top, right, bottom or left."bottom" | "left" | "right" | "top" | undefined'top'
_touched_touchedShows if the input was touched by a user.boolean | undefinedfalse
_value_valueDefines the value of the element.`${number}.${number}` | `${number}` | number | undefinedundefined

Methods

getValue

getValue() => Promise<number | NumberString | undefined>

Returns the current value.

Returns

Type: Promise<number | NumberString | undefined>

kolFocus() => Promise<void>

Sets focus on the internal element.

Returns

Type: Promise<void>

Slots

SlotDescription
Die Beschriftung des Eingabeelements.

Usage _msg

Case_msg-Value
No messageundefined
Default error messagestring
Message{_type: 'success', _description: 'Success message'}

View example

Live editor

Examples