Components
Link
Inline text links with a visible underline.
Usage
After the one-time setup, call the helper directly from ERB. No component import is needed.
<%= lc_stack gap: :related do %>
<%= lc_text do %>Read the <%= lc_link "installation guide", "/installation.html" %> before you start.<% end %>
<%= lc_text size: :small, tone: :muted do %>Questions? <%= lc_link "Contact support", "/components/link.html", tone: :muted %>.<% end %>
<%= lc_text do %>See <%= lc_link "what's new", "/components/link.html", tone: :primary %> in this release.<% end %>
<% end %>
Examples
Tones
<%= lc_stack gap: :related do %>
<%= lc_text do %>Read the <%= lc_link "installation guide", "/installation.html" %> before you start.<% end %>
<%= lc_text size: :small, tone: :muted do %>Questions? <%= lc_link "Contact support", "/components/link.html", tone: :muted %>.<% end %>
<%= lc_text do %>See <%= lc_link "what's new", "/components/link.html", tone: :primary %> in this release.<% end %>
<% end %>
API reference
Helpers render semantic HTML and include their interaction wiring. Pass native attributes through class:, data:, aria: and the usual Rails options. Blocks use captured ERB content.
lc_link
lc_link(content = nil, url = nil, tone: :inherit, **attributes, &block)
| Input | Default | Values |
|---|---|---|
| content | nil | — |
| url | nil | — |
| tone | :inherit | — |
| attributes | {} | Native HTML attributes; class:, data: and aria: merge with defaults |
| block | Captured block | Captured Rails ERB content |
The examples also use lc_stack and lc_text. Each is documented on its own page.
Styling and extension
Use class: to merge utilities, native attributes for application behavior, and the theming guide for the shared palette. For custom markup, the advanced class helpers expose the same styles, including glass surfaces and class merging.