Skip to main content
Version: 2.0

Frontend - UI - SubmitButton

Creating a submit button that changes while the form is being submitted creates an easy to understand user interface that the form is being processed and prevents double clicks.

Props

NameData TypeDefaultDescription
button-classstringbtn--mainThe css class for the button
in-progressbooln/aIf the submission is in progress
loading-textstringIn ProgressThe text to be shown while in progress

Slots

There are two slots, the default slot and loading slot.

The loading slot is optional and contains LoadingMessage by default.

Example

<SubmitButton :in-progress="submitting">Save</SubmitButton>

<SubmitButton loading-text="Saving">Save</SubmitButton>

<SubmitButton>
<template v-slot:default>Submit</template>
<template v-slot:loading>Submitting</template>
</SubmitButton>