Skip to content
Components

Nav list

Navigation that marks the current page: sidebars, page contents, tab rows and a phone dock.

After the one-time setup, call the helper directly from ERB. No component import is needed.

<%= lc_nav_list label: "Settings", class: "w-full max-w-60" do |nav| %>
  <%= nav.group "Workspace" do %>
    <%= nav.link "General", "#general", current: true %>
    <%= nav.link "Members", "#members" %>
    <%= nav.link "Billing", "#billing" %>
  <% end %>
  <%= nav.group "Account" do %>
    <%= nav.link "Profile", "#profile" %>
    <%= nav.link "Notifications", "#notifications" %>
  <% end %>
<% end %>
<%= lc_nav_list label: "Settings", class: "w-full max-w-60" do |nav| %>
  <%= nav.group "Workspace" do %>
    <%= nav.link "General", "#general", current: true %>
    <%= nav.link "Members", "#members" %>
    <%= nav.link "Billing", "#billing" %>
  <% end %>
  <%= nav.group "Account" do %>
    <%= nav.link "Profile", "#profile" %>
    <%= nav.link "Notifications", "#notifications" %>
  <% end %>
<% end %>
<%= lc_nav_list label: "On this page", compact: true, class: "w-full max-w-48" do |nav| %>
  <%= nav.link "Overview", "#overview", current: true %>
  <%= nav.link "Usage", "#usage" %>
  <%= nav.link "Sizes", "#sizes", indent: true %>
  <%= nav.link "API reference", "#api" %>
<% end %>
<%= lc_nav_list label: "Project", layout: :row, indicator: true, class: "w-full" do |nav| %>
  <%= nav.link "Overview", "#overview", icon: "document-text", current: true %>
  <%= nav.link "Activity", "#activity", icon: "clock" %>
  <%= nav.link "Files", "#files", icon: "paper-clip" %>
  <%= nav.link "Settings", "#settings", icon: "cog-6-tooth" %>
<% end %>
<%# On phones, fix it to the bottom with your own classes. layout: :responsive is a dock below sm and a row from sm. %>
<%= lc_nav_list label: "Group", layout: :dock, indicator: true, class: lc_glass_class(thick: true, extra: "w-full max-w-sm") do |nav| %>
  <%= nav.link "Overview", "#overview", icon: "document-text", current: true %>
  <%= nav.link "Members", "#members", icon: "users" %>
  <%= nav.link "Activity", "#activity", icon: "clock" %>
  <%= nav.link "Stats", "#stats", icon: "chart-bar" %>
<% end %>

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_nav_list

lc_nav_list(label:, compact: false, layout: :column, indicator: false, **attributes, &block)
InputDefaultValues
labelRequiredAccessible name, visible where applicable
compactfalsetrue · false
layout:column—
indicatorfalsetrue · false
attributes{}Native HTML attributes; class:, data: and aria: merge with defaults
blockCaptured blockCaptured Rails ERB content

lc_nav_list yields a builder, nav, with these parts. Each part carries data-slot and merges class: and native attributes.

InputDefaultValues
labelnilAccessible name, visible where applicable
urlnil—
iconnilHeroicon name; spacing is handled automatically
currentfalsetrue · false
indentfalsetrue · false
attributes{}Native HTML attributes; class:, data: and aria: merge with defaults
blockCaptured blockCaptured Rails ERB content
InputDefaultValues
titleRequired—
attributes{}Native HTML attributes; class:, data: and aria: merge with defaults
blockCaptured blockCaptured Rails ERB content

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.

API JSON · LLM reference