@blockly/toolbox-search
TypeScript icon, indicating that this package has built-in type declarations

1.2.9 • Public • Published

@blockly/toolbox-search Built on Blockly

A Blockly plugin that adds a toolbox category for searching blocks. The category displays a search field in the toolbox, and filters the available blocks as you type. The Blockly docs have more information about toolbox definitions and categories.

Installation

Yarn

yarn add @blockly/toolbox-search

npm

npm install @blockly/toolbox-search --save

Usage

import * as Blockly from 'blockly';
import '@blockly/toolbox-search';

const toolboxCategories = {
  'contents': [
    /* Other toolbox categories with blocks go here */
    {
      'kind': 'search',
      'name': 'Search',
      'contents': [],
    }
  ]
};

// Inject Blockly.
const workspace = Blockly.inject('blocklyDiv', {
  toolbox: toolboxCategories,
});

License

Apache 2.0

Package Sidebar

Install

npm i @blockly/toolbox-search

Weekly Downloads

483

Version

1.2.9

License

Apache-2.0

Unpacked Size

56.3 kB

Total Files

16

Last publish

Collaborators

  • google-wombot
  • samelhusseini