Fields vs icons
Stay organized with collections
Save and categorize content based on your preferences.
Fields and icons are both visual elements that appear on a block, but they have
different purposes.
Fields show or define data about a block that affects how a program functions.
For example, the text block has two quotation marks, which indicate that you are
defining a string, and a text input that lets you define that string. The
quotation marks tell you about the function of the block, and the input lets
you modify the function.
Icons show or define "meta" information about the block itself. For example,
you can append a comment icon to any block, which lets you write notes to
yourself, but does not affect how the block functions within the program.
Comparison of functionality
Attribute |
Fields |
Icons |
Rendering |
Fields can be made of whatever elements they want. |
Icons can be made of whatever elements they want. |
Number |
Fields can each appear any number of times in a block. |
Icons can each appear once in a block. |
Placement |
Fields can be positioned in any location on any input of a block. |
Icons are always positioned at the top-start of a block. |
Serialization |
Fields can be serialized, and often are. |
Icons can be serialized, but are often not, because they often don't have state. |
Collapsing |
Fields are hidden when a block is collapsed and their text is shown instead. |
Icons can control whether they are shown or hidden when the block is collapsed. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-29 UTC."],[],["Fields and icons are distinct visual elements on a block with different purposes. Fields display or define data affecting a program's function, like the quotation marks and text input on a text block. Icons provide \"meta\" information about a block, such as a comment icon, which doesn't impact program function. Fields can appear multiple times, have varied rendering and placement, and are often serialized. Icons appear once per block, are fixed at the top-start, and are often not serialized, but can control visibility when a block is collapsed.\n"]]