// Generated by scripts/generate-showcase.mjs. Do not edit directly. page TextLinkDetail { layout = "showcase" state playground_label = ctx.url.searchParams.get("pg_label") ?? "Text Link" state playground_href = ctx.url.searchParams.get("pg_href") ?? "#text-link-demo" state playground_target = ctx.url.searchParams.get("pg_target") ?? "" state playground_rel = ctx.url.searchParams.get("pg_rel") ?? "" state playground_external = (ctx.url.searchParams.get("pg_external") ?? "false") === "true" state playground_icon = ctx.url.searchParams.get("pg_icon") ?? "" state playground_iconPosition = ctx.url.searchParams.get("pg_iconPosition") ?? "start" state playground_showArrow = (ctx.url.searchParams.get("pg_showArrow") ?? "true") === "true" state playground_underline = (ctx.url.searchParams.get("pg_underline") ?? "false") === "true" state playground_size = ctx.url.searchParams.get("pg_size") ?? "default" state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary" state playground_variant = ctx.url.searchParams.get("pg_variant") ?? "default" state playground_disabled = (ctx.url.searchParams.get("pg_disabled") ?? "false") === "true" state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1" seo { title = "Text Link" description = "Render an accessible text action with optional icon, arrow, underline, external state, and semantic styling." } view {
Marketing component

Text Link

Render an accessible text action with optional icon, arrow, underline, external state, and semantic styling.

14 props0 slots3 outputsTheme readyResponsive
Interactive playground

Configure Text Link

Change any prop and inspect the server-rendered component immediately.

Live preview
Component code
<TextLink
  label="Text Link"
  href="#text-link-demo"
/>
Event outputInteract with the preview to inspect the typed payload.
Component props14 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Inline directional link

Use a lightweight link at the end of a card, section, or short content block.

01
Component usage.wrn
<TextLink
  href="#learn"
/>
Compact

Underlined content link

Use an underline when the link appears inside long-form text.

02
Component usage.wrn
<TextLink
  label="Read the complete guide"
  href="#guide"
  icon="icon-[lucide--arrow-right]"
  showArrow="false"
  underline="true"
  size="sm"
  variant="secondary"
/>
Advanced

External developer link

Clearly communicate that a resource opens outside the current application.

03
Component usage.wrn
<TextLink
  label="Open WRNexusJS documentation"
  href="https://wrnexusjs.dev"
  target="_blank"
  external="true"
  icon="icon-[lucide--book-open]"
  showArrow="false"
  size="lg"
  variant="soft"
/>
Component outputs

Receive every typed component output

Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.

@clickFires when the interactive surface is activated.
@focusFires when the interactive control receives focus.
@blurFires when focus leaves the interactive control.
Declarative handlers.wrn
<TextLink
  @click='console.log(payload)'
  @focus='console.log(payload)'
  @blur='console.log(payload)'
/>
Direct output handlers.js
import { registerOutputHandler } from "@wrnexus/csr/outputs"

const component = document.querySelector("[data-ui-component=\"TextLink\"], [data-component=\"TextLink\"]")

if (component) registerOutputHandler(component, "click", (payload) => {
  console.log("click", payload)
})

if (component) registerOutputHandler(component, "focus", (payload) => {
  console.log("focus", payload)
})

if (component) registerOutputHandler(component, "blur", (payload) => {
  console.log("blur", payload)
})
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
labelstring"Learn more"No
hrefstring"#"No
targetstring""No
relstring""No
externalbooleanfalseNo
iconstring""No
iconPositionstring"start"No
showArrowbooleantrueNo
underlinebooleanfalseNo
sizestring"default"No
colorstring"primary"No
variantstring"default"No
disabledbooleanfalseNo
classstring""No
} }