Inherits from Text.
* has the same capabilities.
Basics
The Url field is an extension of Text that defaults to setting type=url.
use MoonShine\UI\Fields\Url;Url::make('Link')use MoonShine\UI\Fields\Url;Url::make('Link')
Title
The title() method allows you to set the link title.
title(Closure $callback)title(Closure $callback)
use MoonShine\UI\Fields\Url;Url::make('Link')->title(fn(string $url, Url $ctx) => str($url)->limit(3))use MoonShine\UI\Fields\Url;Url::make('Link')->title(fn(string $url, Url $ctx) => str($url)->limit(3))
Blank
The blank() method adds the attribute target="_blank" for the link preview. Therefore, in this mode, the link will open in a new window.
blank()blank()
use MoonShine\UI\Fields\Url;Url::make('Link')->blank()use MoonShine\UI\Fields\Url;Url::make('Link')->blank()