Skip to content

UrlField

Renders a record field as a clickable hyperlink (<a>). Prevents row click bubbling in tables.

import { UrlField } from '@/components/admin';
<UrlField source="website" target="_blank" rel="noopener" />

If the value is missing, renders nothing unless empty is provided.

PropRequiredTypeDefaultDescription
sourceRequiredstring-Field containing the URL
defaultValueOptionalany-Fallback when no value
emptyOptionalReactNode-Placeholder when no value
recordOptionalobjectRecord from contextExplicit record

Additional props are passed to the underlying <a> element (e.g., target, rel, className).

  • Adds underline styling by default; override with className.
  • Clicks call stopPropagation so row click handlers aren’t triggered.