Action menu
An invoice's actions
- Show
Source
<details>
<summary>An invoice's actions</summary>
<Kit.Phoenix.Roles.ActionMenu.action_menu
id="role-action-menu-invoice"
label="More actions for this invoice"
groups={[
Kit.Phoenix.Menu.group([
Kit.Phoenix.Menu.item("Edit", icon: "pencil-simple", keys: ["E"]),
Kit.Phoenix.Menu.item("Duplicate", icon: "copy", keys: ["Ctrl", "D"]),
Kit.Phoenix.Menu.item("Send…", icon: "envelope-simple"),
Kit.Phoenix.Menu.submenu("role-action-menu-invoice-sort", "Sort lines", [
Kit.Phoenix.Menu.group([
Kit.Phoenix.Menu.choice("By date", true),
Kit.Phoenix.Menu.choice("By amount", false),
Kit.Phoenix.Menu.choice("By description", false)
])
], icon: "arrows-down-up"),
Kit.Phoenix.Menu.item("Archive", icon: "archive", reason: "Only the invoice's owner can archive it.")
]),
Kit.Phoenix.Menu.group("Show", [
Kit.Phoenix.Menu.toggle("Line totals", true),
Kit.Phoenix.Menu.toggle("Notes", false)
]),
Kit.Phoenix.Menu.group([
Kit.Phoenix.Menu.destructive("Delete invoice", icon: "trash")
])
]}
/>
</details>
Action menu, inert
An Action menu in a Row's actions, its trigger inert with its words.
Oakmere Primary School · due
A sent invoice can’t be changed until it is filed.
An Action menu alone, its trigger inert with its words directly after it.
A sent invoice can’t be changed until it is filed.
Source
<p class="specimen-case-line">An Action menu in a Row's actions, its trigger inert with its words.</p>
<Kit.Phoenix.Roles.Row.row>
<:subject href="#role-action-menu-inert">Invoice 1042</:subject>
<:facts>Oakmere Primary School · due <Kit.Phoenix.Roles.Time.time value={Kit.Phoenix.Time.day(reader(), ~D[2026-10-30])} /></:facts>
<:actions>
<Kit.Phoenix.Roles.SecondaryAction.secondary_action>Send reminder</Kit.Phoenix.Roles.SecondaryAction.secondary_action>
</:actions>
<:actions
id="role-action-menu-inert-row"
label="More actions for this invoice"
action_state={Kit.Phoenix.ActionState.inert("role-action-menu-inert-row-trigger", [Kit.Phoenix.Words.text("A sent invoice can’t be changed until it is filed.")])}
groups={[
Kit.Phoenix.Menu.group([
Kit.Phoenix.Menu.item("Edit", icon: "pencil-simple", keys: ["E"]),
Kit.Phoenix.Menu.item("Duplicate", icon: "copy", keys: ["Ctrl", "D"])
]),
Kit.Phoenix.Menu.group([
Kit.Phoenix.Menu.destructive("Delete invoice", icon: "trash")
])
]}
/>
</Kit.Phoenix.Roles.Row.row>
<p class="specimen-case-line">An Action menu alone, its trigger inert with its words directly after it.</p>
<Kit.Phoenix.Roles.ActionMenu.action_menu
id="role-action-menu-inert-alone"
label="More actions for this invoice"
state={Kit.Phoenix.ActionState.inert("role-action-menu-inert-alone-trigger", [Kit.Phoenix.Words.text("A sent invoice can’t be changed until it is filed.")])}
groups={[
Kit.Phoenix.Menu.group([
Kit.Phoenix.Menu.item("Edit", icon: "pencil-simple", keys: ["E"]),
Kit.Phoenix.Menu.item("Duplicate", icon: "copy", keys: ["Ctrl", "D"])
]),
Kit.Phoenix.Menu.group([
Kit.Phoenix.Menu.destructive("Delete invoice", icon: "trash")
])
]}
/>