drawer(title:, close_href: nil, eyebrow: nil) do |d|
d.with_meta { … }
d.with_action { … }
d.with_section(title = nil) { … }
end
Render it into a Turbo Frame next to the list so the list stays usable, and mark the list row current. Escape and the close button follow close_href (or remove the drawer when there is none).
<div class="doc-frame" style="height: 360px">
<%= drawer(title: "Nota 1235", eyebrow: "Fictícia Serviços ME", style: "width: 420px") do |d| %>
<% d.with_meta do %>
<%= cluster do %><%= status_pill "Autorizada" %><span class="tr-muted">Emitida em 07/11/2026</span><% end %>
<% end %>
<% d.with_action { button "Abrir PDF", size: :sm, icon: "file-text" } %>
<% d.with_action { button "Copiar chave", size: :sm, icon: "copy" } %>
<% d.with_section("Tomador") { tag.p("Fictícia Serviços ME · 98.765.432/0001-10") } %>
<% d.with_section("Valores") { tag.p("Serviço R$ 820,50 · ISS R$ 41,03", class: "tr-num") } %>
<% end %>
</div>
Slots
| Slot | What goes in it |
|---|---|
meta | Status pill and a context line under the title |
action | Small buttons under the meta |
section | Body sections, each with an optional heading |