Components
Skip link
Lets keyboard users jump past repeated navigation.
Usage
After the one-time setup, call the helper directly from ERB. No component import is needed.
<%= lc_stack gap: :related, class: "items-center" do %>
<%= lc_text "Press Tab on this page: the skip link is the first thing to receive focus.", size: :small, tone: :muted %>
<%= lc_skip_link "#examples", class: "not-sr-only static" %>
<% end %>
Examples
Skip link
<%= lc_stack gap: :related, class: "items-center" do %>
<%= lc_text "Press Tab on this page: the skip link is the first thing to receive focus.", size: :small, tone: :muted %>
<%= lc_skip_link "#examples", class: "not-sr-only static" %>
<% 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_skip_link
lc_skip_link(target = "#main", label: lc_t("lostcoords.ui.skip_link.label"), **attributes)
| Input | Default | Values |
|---|---|---|
| target | "#main" | — |
| label | lc_t("lostcoords.ui.skip_link.label") | Accessible name, visible where applicable |
| attributes | {} | Native HTML attributes; class:, data: and aria: merge with defaults |
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.