Tabs

Subsets of the same records, each with its count.

Helper
tabs(label:) do |t|
  t.with_tab(label, href: nil, count: nil, selected: false, panel: nil)
  t.with_action { … }
end

tab_panel(id:, selected: false) do
  # shown while the tab with panel: id is selected
end

Tabs without href: switch on the page: give each one panel: with the id of a tab_panel and only the selected panel shows. Arrow keys move between tabs. They dispatch componeer--tabs:change.

Tabs with href: are links, so each subset has its own URL (the usual choice for filtered lists, as in page_header's tabs slot).

Lançar o canal até março Fechar 3 clientes novos no trimestre