Skip to content
Components

Empty state

A starting point when there is no content yet.

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

<%= lc_empty_state class: "w-full" do %>
  <%= lc_icon_badge shape: :circle, tone: :primary, icon: "folder-plus", size: :lg%>
  <%= lc_stack gap: :tight, class: "max-w-xs" do %>
    <%= lc_heading "No projects yet", level: 3, size: :subheading %>
    <%= lc_text "Create a project to get started.", size: :small, tone: :muted %>
  <% end %>
  <%= lc_button "Create project" %>
<% end %>

No projects yet

Create a project to get started.

<%= lc_empty_state class: "w-full" do %>
  <%= lc_icon_badge shape: :circle, tone: :primary, icon: "folder-plus", size: :lg%>
  <%= lc_stack gap: :tight, class: "max-w-xs" do %>
    <%= lc_heading "No projects yet", level: 3, size: :subheading %>
    <%= lc_text "Create a project to get started.", size: :small, tone: :muted %>
  <% end %>
  <%= lc_button "Create project" %>
<% end %>

No drafts yet

Drafts you start appear here until you post them.

<%= lc_empty_state title: "No drafts yet", text: "Drafts you start appear here until you post them.", icon: "pencil-square", card: true, class: "w-full" do %>
  <%= lc_button "New draft", icon: "plus" %>
<% 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_empty_state

lc_empty_state(title: nil, text: nil, icon: nil, level: 2, card: false, **attributes, &block)
InputDefaultValues
titlenil—
textnil—
iconnilHeroicon name; spacing is handled automatically
level2—
cardfalsetrue · false
attributes{}Native HTML attributes; class:, data: and aria: merge with defaults
blockCaptured blockCaptured Rails ERB content

The examples also use lc_icon_badge, lc_stack, lc_heading, lc_text, and lc_button. 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.

API JSON · LLM reference