# `PhoenixKitWeb.Components.Core.FormActions`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.165/lib/phoenix_kit_web/components/core/form_actions.ex#L1)

Form-footer action bar — Cancel link + Submit button, right-aligned.

Replaces the repeated boilerplate:

    <div class="flex justify-end gap-3">
      <.link navigate={cancel_path} class="btn btn-ghost">Cancel</.link>
      <button type="submit" class="btn btn-primary" phx-disable-with="Saving…">
        {submit_label}
      </button>
    </div>

with a single component call.

## Attributes

- `cancel_to` — Path the Cancel link navigates to. Required.
- `submit_label` — Text on the submit button (e.g. `"Save"`, `"Create Endpoint"`).
  Required.
- `submitting_label` — `phx-disable-with` text shown while the form is
  submitting. Defaults to `"Saving…"` (gettext-translated).
- `submit_icon` — Optional Heroicon name rendered inside the submit
  button (e.g. `"hero-check"`).
- `submit_class` — Class for the submit button. Default `"btn btn-primary"`.
- `class` — Extra classes appended to the outer wrapper.

## Slots

- `inner_block` — Optional extra controls rendered BEFORE Cancel + Submit
  (e.g. a secondary "Save and Return" button).

## Example

    <.form_actions
      cancel_to={Paths.endpoints()}
      submit_label={if @endpoint, do: gettext("Update"), else: gettext("Create")}
      submit_icon="hero-check"
    />

# `form_actions`

## Attributes

* `cancel_to` (`:string`) (required)
* `submit_label` (`:string`) (required)
* `submitting_label` (`:string`) - Defaults to `nil`.
* `submit_icon` (`:string`) - Defaults to `nil`.
* `submit_class` (`:string`) - Defaults to `"btn btn-primary"`.
* `class` (`:string`) - Defaults to `nil`.
## Slots

* `inner_block`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
