php artisan aura:add link
Copies the component source into resources/views/components/aura/. Run php artisan aura:init first if you haven't already. See the CLI guide for all options.
composer require bluestarsystem/aura-ui
php artisan aura:install
Full installation instructions in the Installation guide.
Overview
<x-aura::link> is a styled <a> with a visible focus ring and correct handling for links that leave the site.
Basic Usage
<x-aura::link href="/docs/components/button">Read the Button docs</x-aura::link><x-aura::link href="/docs/components/button">Read the Button docs</x-aura::link>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
href |
string |
'#' |
Destination. |
external |
bool |
false |
Open in a new tab, with the safety and accessibility work that requires. |
underline |
bool |
true |
Underline at rest. false underlines on hover only. |
External links
<x-aura::link href="https://laravel.com" external>Laravel</x-aura::link>external does three things, and all three matter:
target="_blank"opens a new tab;rel="noopener noreferrer"stops the opened page from reaching back throughwindow.opener;- a visually hidden "(opens in a new tab)" tells a screen-reader user what the new tab does — otherwise focus simply lands somewhere else with no explanation.
Accessibility
Link text must make sense read on its own: someone listing the links on a page hears them without the surrounding sentence. "Read more" and "click here" tell them nothing — aura:doctor --a11y flags both.
underline="false" is safe inside navigation, where position makes the link obvious. Inside a paragraph, leave the underline on: colour alone is not a sufficient signal.