Options
All
  • Public
  • Public/Protected
  • All
Menu

Slider powered by Angular Material library.

Example of usage

Orange slider with thumb label always on

export const component: DraymanComponent = async ({ forceUpdate }) => {

    let currentValue = 0;

    return () => {
        return (
            <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100%', flexDirection: 'column' }}>
                <drayman-slider
                    onValueChange={async ({ value }) => {
                        currentValue = value;
                        await forceUpdate();
                    }}
                    enableThumbLabel
                    color="orange"
                    alwaysOnThumb
                    min={-1000}
                    max={1000}
                    value={currentValue}
                />
                <div>Current value on server: {currentValue}</div>
            </div>
        );
    }
}

Hierarchy

Index

Properties

Optional alwaysOnThumb

alwaysOnThumb: boolean

Whether to always show the value on the thumb.

Optional color

color: string

The color of the slider

Optional disabled

disabled: boolean

Whether the control is disabled.

Optional enableThumbLabel

enableThumbLabel: boolean

Whether to show the value of the slider on the thumb.

Optional label

label: string

The floating label for a field.

Optional max

max: number

The maximum value of the slider.

Optional min

min: number

The minimum value of the slider.

Optional onValueChange

onValueChange: ElementEvent<{ value: boolean }>

Executed with an input value from user.

Optional ref

ref: string

Optional step

step: number

The step value of the slider.

Optional style

style: CSS

Optional tickInterval

tickInterval: number

The interval between ticks.

Optional updateOnBlur

updateOnBlur: boolean

Wether value of the field should be emitted when user is blurred out of the control.

Optional value

value: boolean

Value of the input.