Link
An inline text link, optionally with a leading icon. Dotted underline on hover, solid underline when selected.
| Prop | Type | Default | Notes |
|---|---|---|---|
label |
String | nil |
Link text. Also accepts a content block. |
href |
String | nil |
The link target. |
icon |
String | nil |
Optional leading icon name, rendered via IconComponent (16px). |
selected |
Boolean | false |
When true, carries a persistent solid underline. |
**html_options |
Hash | — | Any extra HTML attributes (data-*, aria-*, class, …). |
Selected
1 | <%= render LinkComponent.new(label: "Link", href: "#", selected: true) %> |
Text
1 | <%= render LinkComponent.new(label: "Link", href: "#") %> |
With icon
1 | <%= render LinkComponent.new(label: "Link", href: "#", icon: "arrow-right") %> |