Skip to main content
urlField returns a Text field that stores a web address as typed. Every save checks that the value is a web address, the admin panel shows it as a link that opens in a new tab, and agents and generated types are told what the text means. You don’t name any components or write a validator.
The result is a plain text field, so it works anywhere a field does, including inside groups, arrays, tabs and blocks.

Config options

A URL field holds one address, 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:

Accepted addresses

Every save checks the value, whether it comes from the admin panel, the REST API, GraphQL, the Local API or an agent. A web address has one of two forms:
  • Full: it starts with http:// or https://, in any letter case, and has a host. No dot is needed, so http://localhost:3000 is accepted.
  • Bare: it has no scheme and starts with a letter or digit, and its host contains a dot. A port, path, query and fragment are allowed.
Any value with a space or a control character is rejected, and so is every other scheme. A rejected value fails with:
An empty value skips the check; set required to reject it.

Admin options

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

Display and editing

A URL shows as typed, as a link that opens in a new tab without giving the new page access to the admin window. A full address opens as stored, and a bare one opens with https:// in front, so example.com/pricing opens https://example.com/pricing. A long address is cut to one line with an ellipsis, and hovering shows the whole address. Links work in the List, on Board cards and in Calendar events. Clicking a link on a card opens only the link, not the card. In the List’s first column, which already links to the document, the address shows as text inside the document link. An empty value shows nothing: no placeholder and no dash. A stored value that isn’t an accepted address, for example one saved before the field became a URL field, shows as plain text and is never turned into a link. If a URL 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 URL field uses the normal text input, and a read-only field shows the address in a read-only text input.

Stored value

Addresses are stored exactly as typed. 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 website?: string | null.
Stored values may lack a scheme, such as example.com. Code that opens or follows them should handle both forms. getUrlHref turns either form into a full address.

Agents and generated types

A URL 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 URL text is added after it in parentheses. The admin panel still shows only your description.
A function admin.description isn’t copied, so the URL 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 URL field’s entry, so it can adjust or replace the description:

Formatting in your code

getUrlHref is the rule URL fields use for both the save check and the links. Import it from frogbot/fields, which is safe to use in browser code:
getUrlHref returns the address to link to: a full address as stored, or https:// followed by a bare address. It returns undefined for an empty value and for any value that isn’t an accepted address.

Custom components

The URL cell is UrlCell 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 link 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 link.