prongs
GitHub

layout.actions

Commands side by side: a form’s buttons, a dialog’s choices

Component

Renders

<div>

Profile

Comes from

starter
Read https://www.prongs.dev/docs/intents/layout/actions.md and tell me whether layout.actions fits what I am building.

Example

Preview
<Layout intent="layout.actions">
<Action intent="action.cancel" onClick={cancel}>Cancel</Action>
<Action intent="action.submit" verb="save">Save</Action>
</Layout>

Connections

Choosing between neighbours

  • If it is

    Use

  • Commands side by side: a form’s buttons, a dialog’s choices

    layout.actions
  • Controls that act on the content below them

    layout.toolbar
  • Commands on their own, like a form’s buttons

    rather than layout.headline
    layout.actions
  • Controls on the page itself

    rather than layout.overlay
    layout.actions

For registry authors

Starter intents. These are the intents prongs add puts in your registry, shown in this site’s theme. Yours are your own registry.ts: rename, restyle and add to them, and see them with prongs add gallery.

What this intent is built from and its entry in components/prongs/registry.ts. You only need this to change how it looks or to add an intent like it.

How layout.actions resolves, and its definition

Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.

  • arrange.row

    Children in a wrapping row

    flex flex-row flex-wrap items-center
  • layout.actions

    Commands side by side: a form’s buttons, a dialog’s choices

    gap-3
Final classes
flex flex-row flex-wrap items-center gap-3
Definition
TS
'layout.actions': {
kind: 'semantic',
description: 'Commands side by side: a form’s buttons, a dialog’s choices',
refs: ['arrange.row'],
binding: { classes: 'gap-3' },
notFor: [
{
context: 'controls that act on the content below them',
instead: 'layout.toolbar',
},
],
},