Is it possible to assign a type value to a Lightning button? For example, type="submit?

<lightning:button variant="base" label="Base" title="Base action" />

I have a submit button in a form, and default behavior for type="submit" is the form can be submitted on keyboard Enter. Can I add the type attribute to the component?

1 Answer 1


Yes, you can.

From specification:

Specifies the type of button. Valid values are button, reset, and submit. This value defaults to button.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .