This aditional package provides a set of built-in forms that can be used in your application.
Installation
There are currently 3 forms available:
Usage
You can import the forms from the package and use them in your application. For example:
Login
The login form is used to authenticate a user in your application.
Name | Type | Required | Description |
---|
submit | function | true | The function that will be called when the form is submitted. |
texts | object | false | The texts that will be used in the form. |
Name | Type | Description |
---|
on:error | function | This event is triggered when the form has an error. |
on:finish | function | This event is triggered when the submit function has finished whether it was successful or not. |
Name | Type | Description |
---|
error | string | This slot is used to display the error message. |
submit | string | This slot is used to display the submit button. |
loading | boolean | This slot is used to display the loading indicator. |
Register
The register form is used to create a new user in your application.
Name | Type | Required | Description |
---|
submit | function | true | The function that will be called when the form is submitted. |
texts | object | false | The texts that will be used in the form. |
Name | Type | Description |
---|
on:error | function | This event is triggered when the form has an error. |
on:finish | function | This event is triggered when the submit function has finished whether it was successful or not. |
Name | Type | Description |
---|
error | string | This slot is used to display the error message. |
submit | string | This slot is used to display the submit button. |
loading | boolean | This slot is used to display the loading indicator. |
Forgot password
The forgot password form is used to request a password reset for a user in your application.
Name | Type | Required | Description |
---|
submit | function | true | The function that will be called when the form is submitted. |
texts | object | false | The texts that will be used in the form. |
Name | Type | Description |
---|
on:error | function | This event is triggered when the form has an error. |
on:finish | function | This event is triggered when the submit function has finished whether it was successful or not. |
Name | Type | Description |
---|
error | string | This slot is used to display the error message. |
submit | string | This slot is used to display the submit button. |
loading | boolean | This slot is used to display the loading indicator. |