LoginFormElement
<vaadin-login-form> is a Web Component providing an easy way to require users to log in into an application. Note that component has no shadowRoot.
<vaadin-login-form></vaadin-login-form>Component has to be accessible from the document layer in order to allow password managers to work properly with form values. Using <vaadin-login-overlay> allows to always attach the component to the document body.
Styling
The following shadow DOM parts are available for styling:
| Part name | Description |
|---|---|
form | Container for the entire component's content |
form-title | Title of the login form |
error-message | Container for error message, contains error-message-title and error-message-description parts. Hidden by default. |
error-message-title | Container for error message title |
error-message-description | Container for error message description |
footer | Container additional information text from i18n object |
The following custom CSS properties are available for styling:
| Custom CSS property |
|---|
--vaadin-login-form-background |
--vaadin-login-form-border-radius |
--vaadin-login-form-error-color |
--vaadin-login-form-error-font-size |
--vaadin-login-form-error-font-weight |
--vaadin-login-form-error-gap |
--vaadin-login-form-error-line-height |
--vaadin-login-form-gap |
--vaadin-login-form-padding |
--vaadin-login-form-title-color |
--vaadin-login-form-title-font-size |
--vaadin-login-form-title-font-weight |
--vaadin-login-form-title-line-height |
--vaadin-login-form-width |
See Styling Components documentation.
Properties
Sets the root heading level (aria-level) for the heading hierarchy. Default value: 1. Child headings automatically increment from this base level i.e. standalone login form renders its title as <h1>, whereas the form in the overlay uses <h2>, as the <h1> element is used by the overlay's own title.
If set, the user name field automatically receives focus when the component is attached to the document.
Whether to hide the forgot password button. The button is visible by default.