Wondering what’s next for npm?Check out our public roadmap! »

    @blockly/field-slider

    2.1.16 • Public • Published

    @blockly/field-slider Built on Blockly

    A Blockly slider field.

    Installation

    Yarn

    yarn add @blockly/field-slider
    

    npm

    npm install @blockly/field-slider --save
    

    Usage

    JavaScript

    import * as Blockly from 'blockly';
    import {FieldSlider} from '@blockly/field-slider';
    Blockly.Blocks["test_field_slider"] = {
      init: function () {
        this.appendDummyInput()
          .appendField("slider: ")
          .appendField(new FieldSlider(50), "FIELDNAME")
      }
    };

    JSON

    import * as Blockly from 'blockly';
    import '@blockly/field-slider';
    Blockly.defineBlocksWithJsonArray([
        {
            "type": "test_field_slider",
            "message0": "slider: %1",
            "args0": [
                {
                    "type": "field_slider",
                    "name": "FIELDNAME",
                    "value": 50
                }
            ]
        }]);

    License

    Apache 2.0

    Install

    npm i @blockly/field-slider

    DownloadsWeekly Downloads

    287

    Version

    2.1.16

    License

    Apache-2.0

    Unpacked Size

    40.7 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar
    • avatar