Skip to main content

url Field Type

type: 'url' renders a web address as plain text. Adding renderAs: 'link' upgrades it to a clickable <a> element with optional custom label text, new-tab behaviour, and an external-link warning indicator.

Core Examples​

Basic URL Field​

Profile URL rendered as plain text in table mode.

Name
Role
Profile URL
Aurora ChenDesign Leadhttps://profiles.example.com/aurora-chen
Mateo SilvaPlatform Engineerhttps://profiles.example.com/mateo-silva
Priya NairOperationshttps://profiles.example.com/priya-nair
{ key: 'profile', label: 'Profile URL', type: 'url' }

renderAs: 'link' renders the value as an <a> element using the raw value as href. Use renderAsOptions.text to show a human-readable label instead of the raw URL. Set externalWarning: true to render an ↗ indicator on external links.

text can be a static string or a function receiving the full entity — useful for per-row labels.

Profile column shows a static 'View profile' label for all rows with an external-link indicator. Docs column uses a per-row label from the entity name. Priya's null docs field is hidden via condition.

{
key: 'profile',
label: 'Profile',
type: 'url',
renderAs: 'link',
renderAsOptions: { text: 'View profile', newTab: true, externalWarning: true },
},
{
key: 'docs',
label: 'Docs',
type: 'url',
renderAs: 'link',
renderAsOptions: { text: (entity) => entity.name + ' docs', newTab: true },
condition: (entity) => Boolean(entity.docs),
},

Formatter​

formatter transforms the raw value before display. Common uses: extract a path segment (username, slug), strip query strings, or normalize trailing slashes.

Profile URL shown with wrap: true; username extracted from the last path segment into a separate column.

Name
Profile URL
Username
Aurora Chenhttps://profiles.example.com/aurora-chenaurora-chen
Mateo Silvahttps://profiles.example.com/mateo-silvamateo-silva
Priya Nairhttps://profiles.example.com/priya-nairpriya-nair
{
key: 'profile',
label: 'Profile URL',
type: 'url',
wrap: true,
},
{
key: 'profile',
label: 'Username',
type: 'text',
formatter: (value) => {
const parts = String(value ?? '').replace(/\/$/, '').split('/');
return parts[parts.length - 1] ?? '';
},
},

Condition​

condition receives the full entity and returns true to show the field or false to hide it entirely. Use it to suppress rows where the URL is null or empty.

Docs link is hidden for Priya whose docs value is null. Aurora and Mateo show clickable links.

Name
Role
Docs
Aurora ChenDesign LeadOpen docs
Mateo SilvaPlatform EngineerOpen docs
Priya NairOperations
{
key: 'docs',
label: 'Docs',
type: 'url',
renderAs: 'link',
renderAsOptions: { text: 'Open docs', newTab: true },
condition: (entity) => Boolean(entity.docs),
}

Field Options Reference​

OptionTypeDefaultEffect
keystringrequiredEntity property to read the value from.
labelstringunsetColumn header or card label.
type'url'—Renders as plain text. Use renderAs: 'link' for a clickable <a> element.
wraptrue, falseinherited from ItemConfig.wrapfalse: single line, clips with ellipsis in card modes. true: wraps — uses forced word-breaking since URLs have no natural break points.
formatter(value, entity) => unknownunsetTransforms the raw value before display. Does not mutate the entity.
condition(entity) => booleanunsetHides the field for rows where the function returns false.
renderAs'link'unsetRenders as a clickable <a> element using the raw value as href.
renderAsOptionsLinkRenderAsOptionsunsetOptions forwarded to the link renderer (see table below).
widthCSS length or numberunsetSets column width in table mode.
align'left', 'center', 'right''left'Text alignment in table mode.
showLabeltrue, falsetrue when label is setShows or hides the label in card/grid layouts.
OptionTypeDefaultEffect
textstring or (entity) => stringraw URLDisplay text for the link.
urlstring or (entity) => stringraw valueOverride the href (useful when the field value is not itself the URL).
newTabbooleanfalseOpens link in a new tab with rel="noopener noreferrer".
externalWarningbooleanfalseAppends an ↗ icon to external links.
classNamestringunsetAdditional CSS class on the <a> element.

Caveats​

  • url shares the same base renderer as text, textarea, and email — it outputs <span className="field-text"> when rendered as plain text.
  • wrap: true applies forced word-breaking for url fields specifically, since long URLs have no natural break points.
  • Unlike type: 'email', there is no automatic URL prefix. The raw value is used as href as-is — ensure values include the full scheme (https://).
  • If the href is not a valid URL (fails the internal URL validation), renderAs: 'link' falls back to plain text rendering.
  • No client-side URL format validation is performed on the raw value.

Why url vs text?​

They render identically today without renderAs: 'link'. The distinction matters for:

Forced word-breaking — wrap: true on url applies overflow-wrap: break-word to handle the absence of natural break points in long URLs. type: 'text' uses natural word boundaries only.

Semantic intent — type: 'url' communicates that the value is a web address to other developers and future tooling.

Forward compatibility — future inline editing will render <input type="url"> for url fields and <input type="text"> for text fields.

See Also​