Actions

Submit

A form's submit button: a tk:button with type="submit" and a "Send" label, translated. While the form is being sent it shows a spinner and blocks further clicks.

Saved: —
Blade

A primary "Save" button. Clicking it, or pressing Enter in the field, submits the form; until the request ends, the label gives place to a spinner, the button keeps its width and is disabled, so the form is not sent twice.

Default label #

A "Send" button (translated). tk:form adds one like it, full width, when the form has no submit button of its own.

Blade

Content in the slot #

The slot takes the place of label and can hold markup.

Blade

Variants, sizes and icons #

Every tk:button prop passes through: variant, color, size, icon and icon-trailing.

Blade

Loading and disabled #

loading picks another spinner, :loading=false turns it off, and a button rendered disabled shows no spinner.

Blade

Customization #

Classes and attributes go to the <button>, as on tk:button; here it fills the form width.

Blade

Reference

tk:submit

Prop Type Default Description
label string | slot Send The button text, translated. The default slot takes its place.

Also accepts every prop of tk:button (variant, size, icon, loading...) and the element props.

Slots

Slot Description
default The button content, in place of label.

Customization

As tk:button: classes and attributes go to the <button>.

blade

Accessibility

A native <button type="submit">. The spinner is hidden from screen readers.

Behavior notes

  • Outside Livewire, a submitted form disables its submit buttons until the page changes, so a double click does not send it twice; they come back after 10 seconds, or when the user returns to the page with the browser's back button. data-tallkit-allow-resubmit on the form, or on the clicked button, turns this off, and a form with a target other than _self is left alone.
  • A button disabled when the page renders (disabled, :disabled, x-bind:disabled) shows no spinner.
  • :loading="false" turns the spinner off.