@nospamproxy/core
    Preparing search index...

    A simple slider for numeric user input.

    // example.t
    class Example {
    value = 7;
    values = [0, 2, 5, 20, 100];
    }
    <!-- example.html -->
    <slider-control value.two-way="value" values.bind="values">
    <normal-text value="Limit file size to"></normal-text>
    <value-text value.bind="value | formatFileSize"></value-text>
    <normal-text value="."></normal-text>
    </slider-control>

    To create dependent min/max sliders the minimum and maximum values can be bound to the corresponding sliders:

    <slider-control value.two-way="value" values.bind="minSize" max.bind="maxSize">
    <normal-text value="Files must have a size of at least"></normal-text>
    <value-text value.bind="value | formatFileSize"></value-text>
    <normal-text value="."></normal-text>
    </slider-control>
    <slider-control value.two-way="value" values.bind="maxSize" min.bind="minSize">
    <normal-text value="Files can have a size of up to"></normal-text>
    <value-text value.bind="value | formatFileSize"></value-text>
    <normal-text value="."></normal-text>
    </slider-control>

    Implements

    • ICustomElementViewModel
    Index

    Constructors

    Properties

    disabled: boolean = false

    True, to disable this control.

    formatValue?: string | ((value: number) => string) = undefined

    This can be a function to convert a value to it's display text or the name of a value converter to use.

    labelledBy: string = ''
    max?: number = undefined

    If this value changes and this slider's value is larger, this slider's value will be set to this maximum value.

    min?: number = undefined

    If this value changes and this slider's value is smaller, this slider's value will be set to this minimum value.

    value: number = 0

    The current value.

    This may be outside of the range of possible values.

    values: number[] = []

    An array of possible values that the user can select.

    This must be sorted in ascending order and may include negative values and infinity.

    Methods

    • Returns void

    • Returns void

    • Returns void