Docs / Inlay / Links

Links

The Link field type hydrates into WearePixel\Inlay\Support\LinkValue, a plain readonly value object with label, url, and openInNewTab:

use WearePixel\Inlay\Attributes\Link; use WearePixel\Inlay\Support\LinkValue; final class Hero extends Component implements InlayComponent { public function __construct( #[Link(label: 'Call to action')] public ?LinkValue $cta = null, ) {} } @if ($cta) <a href="{{ $cta->url }}" @if ($cta->openInNewTab) target="_blank" @endif>{{ $cta->label }}</a> @endif

URL scheme safety

Only http://, https://, mailto:, and relative (scheme-less) URLs are ever persisted. Anything else - javascript:..., for example - is rejected before it reaches storage, at the point an editor saves it. You can render $cta->url directly into an href attribute without adding your own scheme check.

Discovery Call

One call.
We'll both know.

An hour to walk through your project, ask the hard questions, and work out honestly if we're the right team for it.

  • One call per day - it gets our full attention
  • Australia's only Laravel Premier Partner
  • Senior engineers only - no juniors on your project
  • Brisbane-based, onshore team

Press Esc to close  ·  B to reopen