Standard navigation link
Use for routes within the current application.
<Link
label="Open components"
href="/base"
/>
// Generated by scripts/generate-showcase.mjs. Do not edit directly.
page LinkDetail {
layout = "showcase"
state playground_size = ctx.url.searchParams.get("pg_size") ?? "default"
state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary"
state playground_label = ctx.url.searchParams.get("pg_label") ?? "Link"
state playground_href = ctx.url.searchParams.get("pg_href") ?? "#link-demo"
state playground_target = ctx.url.searchParams.get("pg_target") ?? ""
state playground_rel = ctx.url.searchParams.get("pg_rel") ?? ""
state playground_underline = ctx.url.searchParams.get("pg_underline") ?? "hover"
state playground_external = (ctx.url.searchParams.get("pg_external") ?? "false") === "true"
state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1"
seo {
title = "Link"
description = "Render an accessible internal or external link with target, relation, size, color, and public focus or click events."
}
view {
Render an accessible internal or external link with target, relation, size, color, and public focus or click events. Change any prop and inspect the server-rendered component immediately.Link
Configure Link
<Link
href="#link-demo"
/>
Compare configurations and resize the browser to check responsive behavior.
Use for routes within the current application.
<Link
label="Open components"
href="/base"
/>
Communicate external navigation and use safe target attributes.
<Link
size="sm"
label="WRNexusJS documentation"
href="https://wrnexusjs.dev"
target="_blank"
external="true"
/>
Use a larger link in empty states, promotional cards, and resource lists.
<Link
size="lg"
color="info"
label="Explore framework guides"
href="/framework-guides"
/>
All content and behavior shown above is supplied through these props and slots.
| Prop | Type | Default | Required |
|---|---|---|---|
size | string | "default" | No |
color | string | "primary" | No |
label | string | "Link" | No |
href | string | "#" | No |
target | string | "" | No |
rel | string | "" | No |
underline | string | "hover" | No |
external | boolean | false | No |
class | string | "" | No |