Stay organized with collections
Save and categorize content based on your preferences.
Fields are used to define most UI elements on a block. Examples of fields
include string labels, images, inputs for literal data such as strings and
numbers, and rich editors like date pickers and angle pickers. The simplest
example of a field is the math_number block, which uses a field_number to
let the user type a number.
Blockly provides several fields by default to handle a variety of user input.
These can be customized through field-specific configuration or with validators,
which tell a field how to handle specific content in a standard editor.
If you need a fully custom field it takes a bit more work and you'll want to
read most of the fields documentation. Start by learning about the parts
that make up a field or the overview of creating custom fields.
[[["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-06-24 UTC."],[[["\u003cp\u003eFields are the primary components for defining UI elements within blocks, encompassing various input types like text, numbers, and specialized editors.\u003c/p\u003e\n"],["\u003cp\u003eBlockly offers a range of built-in fields that can be further tailored using configuration options or validators for content handling.\u003c/p\u003e\n"],["\u003cp\u003eFor unique UI requirements, developers can create custom fields by understanding their structure and following the customization guidelines.\u003c/p\u003e\n"]]],["Fields define UI elements on blocks, including labels, images, and data inputs like strings, numbers, date, and angles. Blockly offers built-in fields customizable through configuration or validators. For unique needs, users can develop custom fields. The documentation details built-in fields, validators, field anatomy, and custom field creation. If you want to show meta-information about a block, use an icon.\n"],null,["Fields are used to define most UI elements on a block. Examples of fields\ninclude string labels, images, inputs for literal data such as strings and\nnumbers, and rich editors like date pickers and angle pickers. The simplest\nexample of a field is the `math_number` block, which uses a `field_number` to\nlet the user type a number.\n\n| **Note:** If you need to show meta-information about a block, you probably want an icon instead. Read more about [Fields vs Icons](/blockly/guides/create-custom-blocks/fields/fields-vs-icons).\n\nBlockly provides several fields by default to handle a variety of user input.\nThese can be customized through field-specific configuration or with validators,\nwhich tell a field how to handle specific content in a standard editor.\n\n→ More info on [Built-in fields](/blockly/guides/create-custom-blocks/fields/built-in-fields/overview).\n\n→ More info on [Validators](/blockly/guides/create-custom-blocks/fields/validators).\n\nIf you need a fully custom field it takes a bit more work and you'll want to\nread most of the fields documentation. Start by learning about the parts\nthat make up a field or the overview of creating custom fields.\n\n→ More info on the [anatomy of a field](/blockly/guides/create-custom-blocks/fields/anatomy-of-a-field).\n\n→ More info on [creating custom fields](/blockly/guides/create-custom-blocks/fields/customizing-fields/overview)."]]