card(
title: nil,
subtitle: nil,
flush: false # no body padding, for tables
) do |c|
c.with_action { … }
c.with_footer { … }
# body
end
Use cards to group content on dashboards and detail pages, not around every block. flush: true removes the body padding so a table fills the card edge to edge. Trail UI added Card for Componeer; it is built only from existing tokens.
Lançar o canal até março
Canal Exemplo · prazo 31/03/2027
Ter o canal no ar com 8 vídeos publicados e uma rotina semanal de produção.
<%= card(title: "Lançar o canal até março", subtitle: "Canal Exemplo · prazo 31/03/2027") do |c| %>
<% c.with_action { status_pill "Ativa", status: :accent } %>
<% c.with_action { icon_button "pencil", label: "Editar quest" } %>
<p>Ter o canal no ar com 8 vídeos publicados e uma rotina semanal de produção.</p>
<% c.with_footer do %>
<%= button "Abandonar…", size: :sm, variant: :danger %>
<%= button "Concluir quest", size: :sm, icon: "check" %>
<% end %>
<% end %>
Slots
| Slot | What goes in it |
|---|---|
action | Items on the right of the header (pills, icon buttons) |
footer | Right-aligned buttons under the body |