Block


[edit] [history] [purge] Documentation Template documentation

This documentation is transcluded from Template:Block/doc.


This template shows an infobox on the right side of the page with a visualisation of the block and basic information about it.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Namename

The block's name as it appears in the Scratch editor. Replace all inputs with () regardless of type.

Stringrequired
ScratchBlocks code / screenshotimage

Can be either valid [[Block Plugin]] syntax to render the block, or, for blocks where that is not possible, the name of the file where a screenshot of the block has been uploaded. Block Plugin syntax is preferred when possible

Stringrequired
ScratchBlocks Version (only if using Block Plugin)sb

Setting the version of block rendering to use, if block plugin syntax was given above. Usually set to "3.0". Set this to "2.0" to make the block show up as a 2.0 block, useful for blocks that only existed in Scratch 2.0 or 1.4. To use a screenshot, omit this parameter entirely.

Suggested values
3.0 2.0
Auto value
3.0
Stringsuggested
Image size (only if using screenshot)image_size

If using a screenshot instead of Block Plugin syntax, set the size of the image.

Stringoptional
Block Palette Categorycategory

Category that the block is sorted in the Block Palette. Please make this a wikilink to that section's page, or to the extension's page if the block is part of an extension.

Suggested values
[[Motion Blocks|Motion]] [[Looks Blocks|Looks]] [[Sound Blocks|Sound]] [[Events Blocks|Events]] [[Control Blocks|Control]] [[Sensing Blocks|Sensing]] [[Operators Blocks|Operators]] [[Variables Blocks|Variables]] [[List Blocks|List]]
Stringrequired
Typetype

Whether the block is a stack/reporter/boolean/etc

Suggested values
[[Stack Block|Stack]] [[Reporter Block|Reporter]] [[Boolean Block|Boolean]] [[Hat Block|Hat]] [[Cap Block|Cap]]
Stringrequired
Added (in version)added

What version of Scratch this block was added in

Example
[[Scratch 3.0|3.0]]
Stringsuggested
Unlisted (in version)unlisted

(if the block is unlisted) In what version of Scratch this block was removed from the palette (but kept in Scratch)

Example
[[Scratch 2.0|2.0]]
Stringoptional
Removed (in version)removed

(if the block has been removed) In what version of Scratch this block was removed

Example
[[Scratch 3.0|3.0]]
Stringoptional

Example

{{block
| name     = Move () Steps
| image    = move () steps
| category = [[Motion Blocks|Motion]]
| type     = [[Stack Block|Stack]]
| added    = [[11Oct03]]
| sb       = yes
}}

produces:

Move () Steps
move () steps
Category Motion
Type Stack

For blocks that are no longer in Scratch 3.0:

{{block
| name     = Sensor ()?
| image    = <sensor [button pressed v]?:: extension>
| category = [[PicoBoard Blocks|PicoBoard]]
| type     = [[Boolean Block|Boolean]]
| added    = [[2.0]]
| removed  = [[3.0]]
| sb       = 2.0
}}
Sensor ()?
<sensor [button pressed v]?:: extension>
Category PicoBoard
Type Boolean
Introduced in 2.0
Removed in 3.0

For blocks which require an image to render:

{{block
| name       = While ()
| image      = File:0.x While () (block).png
| image_size = 100px
| category   = [[Control Blocks|Control]]
| type       = [[C Block|C]]
}}
While ()
Category Control
Type C
Cookies help us deliver our services. By using our services, you agree to our use of cookies.