Skip to main content
barcodeField returns a Text field that stores a barcode value, such as a UPC or EAN code, as text. The admin panel shows the value as typed, and agents and generated types are told what the text means. You don’t name any components.
The result is a plain text field, so it works anywhere a field does, including inside groups, arrays, tabs and blocks.

Config options

A barcode field holds one value, so hasMany, minRows and maxRows are not accepted. TypeScript rejects them, and setting any of them from JavaScript fails at startup with an error naming the field:
FrogBot doesn’t check the barcode’s format, so any text is accepted. Your own minLength, maxLength and validate apply on every save.

Admin options

Barcode fields support the standard field admin options, plus the Text field’s input options: FrogBot marks the field as a barcode in admin.custom.frogbot.kind. Your own admin.custom keys, and other keys under admin.custom.frogbot, are kept.

Display and editing

A barcode shows as typed, as plain text, in the List, on Board cards and in Calendar events. An empty value shows nothing: no placeholder and no dash. If a barcode field is the first List column, a row with an empty value has no link to open the document from that column. In the document view, a barcode field uses the normal text input. There is no camera scanning and no barcode image.

Stored value

Only the barcode text is stored, with no barcode type such as UPC-A or EAN-13. The REST API, GraphQL and the Local API return the stored text, and the generated TypeScript type is the same as a Text field’s, such as sku?: string | null.
If barcode scanning is added later, the stored value may change to hold the barcode type as well as the text.

Agents and generated types

A barcode field describes itself to agents using FrogBot’s MCP tools and in generated types:
With a string admin.description, or a translated one with an en entry, the barcode text is added after it in parentheses. The admin panel still shows only your description.
A function admin.description isn’t copied, so the barcode text stands alone. The text is English only. Generated types show the text as a comment above the property, and virtual fields don’t appear in MCP tool inputs. To change the text, add your own jsonSchema entry. It runs after the barcode field’s entry, so it can adjust or replace the description:

Custom components

The barcode cell is BarcodeCell from @frogbotai/ui/admin. Your own admin.components.Cell replaces it, and admin.components.Field and other components such as Label, Description, Error, beforeInput and afterInput work as they do on a Text field. A custom Cell can draw the standard display inside its own markup with FieldCell, as shown for Money fields. As with any custom Cell, it appears only in the List view. Board cards and Calendar events keep the standard display.