Skip to content
Shamar

Actions overview

Create and custom header buttons on the list toolbar.
Per-record actions in the ⋮ menu (or inline via .ungrouped()).

Actions are the Filament-style buttons that run against resources and pages: create a record, open a modal, escalate a ticket, delete a selection, or run a custom header job.

Declare them on a resource with static resourceActions(actions), then handle custom names in static handleAction(name, records, ctx).

static resourceActions(actions: ActionBuilder) {
actions.create('New product')
actions.view()
actions.edit()
actions.delete().confirm('Delete this product?')
actions.bulkDelete()
actions.row('duplicate', 'Duplicate').icon('copy').ungrouped()
actions.header('export', 'Export CSV').icon('download')
return actions
}
static override async handleAction(name, records, ctx) {
if (name === 'duplicate') {
// mutate records…
return { message: 'Duplicated', notification: true }
}
if (name === 'export') {
return { message: 'Export queued', notification: { title: 'Export', body: 'CSV will be ready shortly.' } }
}
return null
}
Placement Where it appears Typical use
header List / page toolbar Create, export, notify
row Per-record ⋮ menu (or inline) View, edit, delete, escalate
bulk Selection bar Delete selected, assign

Built-in CRUD actions (create / view / edit / delete / bulkDelete) are wired by the Adonis host. Custom names go through handleAction.

Topic Page
Labels, colors, icons, grouping Appearance
Confirm dialogs Confirmations
Ability gates & policies Authorization
Default CRUD set Built-in
handleAction + notifications Custom
Selection bar Bulk
Page & list toolbar actions Page actions
Modal create / edit / view Modal CRUD

Action modifiers

MethodDescription
.label(text)Button label.
.color(token)primary · accent · danger · gray
.icon(name)Icon id (see Appearance).
.confirm(message)Confirmation dialog before run.
.ability(name)Permission / policy gate.
.grouped() / .ungrouped()Row: ⋮ menu (default) vs inline button.

Playground: Tickets — header notify / export, row escalate / resolve, quickActions modal CRUD.