simple-canvas-library
    Preparing search index...

    Class Slider

    Slider component for range input controls

    const slider = new Slider({
    label: "Volume",
    min: 0,
    max: 100,
    value: 50,
    oninput: (value) => console.log("Volume:", value)
    });

    Hierarchy

    • UIComponent
      • Slider
    Index

    Constructors

    • Parameters

      • config: SliderConfig = {}

      Returns Slider

    Properties

    element: HTMLElement
    isEnabled: boolean = true
    isVisible: boolean = true

    Methods

    • Disable the slider

      Returns this

    • Enable the slider

      Returns this

    • Get the underlying DOM element

      Returns HTMLElement

    • Get whether the slider is enabled

      Returns boolean

    • Check if the component is visible

      Returns boolean

    • Get the current value

      Returns number

    • Hide the component

      Returns this

    • Set the max value

      Parameters

      • max: number

      Returns this

    • Set the min value

      Parameters

      • min: number

      Returns this

    • Set the step value

      Parameters

      • step: number

      Returns this

    • Set the value

      Parameters

      • value: number

      Returns this

    • Show the component

      Returns this